View previous topic :: View next topic |
Author |
Message |
freigeist Guru
Joined: 26 Jan 2004 Posts: 338 Location: Cologne, Germany
|
Posted: Sat Aug 06, 2005 9:58 pm Post subject: [SOLVED] Postfix problem with root (rootmail bounces) |
|
|
Hello,
I have a litte problem with my postfix config. Everythings working fine for all normal users when receiving and sending emails. But root is different. When I send email from my external account to root@mydomain.cc the mail will not be delivered into roots Maildir but will be forwarded to root@domain.com:
Aug 6 23:44:42 [postfix/qmgr] CBFE5480054: from=<xxx@xxx.net>, size=1134, nrcpt=1 (queue active)
Aug 6 23:44:42 [postfix/local] B5751480053: to=<root@mydomain.cc>, relay=local, delay=0, status=sent (forwarded as CBFE5480054)
Aug 6 23:44:42 [postfix/qmgr] B5751480053: removed
Aug 6 23:44:42 [postfix/smtp] CBFE5480054: to=<root@domain.com>, orig_to=<root@mydomain.cc>, relay=none, delay=0, status=bounced (mail for domain.com loops back to myself)
My postfix conf:
alias_database = hash:/etc/mail/aliases
alias_maps = mysql:/etc/postfix/mysql-aliases.cf
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 2
home_mailbox = .maildir/
html_directory = /usr/share/doc/postfix-2.2.2-r1/html
local_destination_concurrency_limit = 2
local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname
local_transport = local
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, www.$mydomain, ftp.$mydomain
mydomain = mydomain.cc
myhostname = mail.mydomain.cc
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.2.2-r1/readme
relocated_maps = mysql:/etc/postfix/mysql-relocated.cf
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_cert_file = /etc/postfix/newcert.pem
smtpd_tls_key_file = /etc/postfix/newreq.pem
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
Anything looking suspicious?
Last edited by freigeist on Sun Aug 07, 2005 10:45 am; edited 1 time in total |
|
Back to top |
|
|
TheRAt Veteran
Joined: 03 Jun 2002 Posts: 1580
|
Posted: Sat Aug 06, 2005 10:06 pm Post subject: |
|
|
You have checked your aliases database (/etc/mail/aliases) to make sure that root mail is not being forwarded to root@domain.com? _________________ All reality is the construct of the observer.
Get Firefox and rediscover the web!
BOFH Excuse #295:
The Token fell out of the ring. Call us when you find it. |
|
Back to top |
|
|
freigeist Guru
Joined: 26 Jan 2004 Posts: 338 Location: Cologne, Germany
|
Posted: Sat Aug 06, 2005 10:13 pm Post subject: |
|
|
Yes:
cat /etc/mail/aliases
# Basic system aliases -- these MUST be present.
MAILER-DAEMON: postmaster
postmaster: root
# General redirections for pseudo accounts.
adm: root
bin: root
daemon: root
exim: root
lp: root
mail: root
named: root
nobody: root
postfix: root
# Well-known aliases -- these should be filled in!
# root:
# operator:
# Standard RFC2142 aliases
abuse: postmaster
ftp: root
hostmaster: root
news: usenet
noc: root
security: root
usenet: root
uucp: root
webmaster: root
www: webmaster
# trap decode to catch security attacks
# decode: /dev/null |
|
Back to top |
|
|
freigeist Guru
Joined: 26 Jan 2004 Posts: 338 Location: Cologne, Germany
|
Posted: Sat Aug 06, 2005 10:15 pm Post subject: |
|
|
Im a little bit curious about the forward to root@domain.com, cause this looks like a default value and has nothing to do with my real domain. |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Sat Aug 06, 2005 10:56 pm Post subject: |
|
|
IIRC Postfix will not deliver email to root due to permission and security. You'll need to alias root to some other account.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
TheRAt Veteran
Joined: 03 Jun 2002 Posts: 1580
|
Posted: Sat Aug 06, 2005 11:19 pm Post subject: |
|
|
Still interested to find out why the forward to the .com domain ?
Would it not just bounce back to the xxx@xxx.xxx account, rather than the root@domain.com account ?
Or am I overlooking something here ? _________________ All reality is the construct of the observer.
Get Firefox and rediscover the web!
BOFH Excuse #295:
The Token fell out of the ring. Call us when you find it. |
|
Back to top |
|
|
freigeist Guru
Joined: 26 Jan 2004 Posts: 338 Location: Cologne, Germany
|
Posted: Sun Aug 07, 2005 10:29 am Post subject: |
|
|
I created an alias to forward mail to another user account in /etc/mail/aliases
root: username
(where username is a local account on that machine)
I ran newaliases and /etc/init.d/postfix restart.
But the problem is still there, mail to root will be forwarded to root@domain.com and then rejected cause root@domain.com loops back...im still wondering where postfix get that root@domain.com address from..
Aug 7 12:22:05 [postfix/qmgr] 755BA480053: from=<xxx@xxx.net>, size=1000, nrcpt=1 (queue active)
Aug 7 12:22:05 [postfix/smtpd] disconnect from pop.xxx.net[xxx.xxx.xxx.xxx]
Aug 7 12:22:05 [postfix/cleanup] 8F93E480054: message-id=<200508071222.13420.xxx@xxx.net>
Aug 7 12:22:05 [postfix/local] 755BA480053: to=<root@mydomain.cc>, relay=local, delay=0, status=sent (forwarded as 8F93E480054)
Aug 7 12:22:05 [postfix/qmgr] 8F93E480054: from=<xxx@xxx.net>, size=1140, nrcpt=1 (queue active)
Aug 7 12:22:05 [postfix/qmgr] 755BA480053: removed
Aug 7 12:22:05 [postfix/smtp] 8F93E480054: to=<root@domain.com>, orig_to=<root@mydomain.cc>, relay=none, delay=0, status=bounced (mail for domain.com loops back to myself)
Aug 7 12:22:05 [postfix/cleanup] B48FC480055: message-id=<20050807102205.B48FC480055@mail.mydomain.cc>
Aug 7 12:22:05 [postfix/qmgr] B48FC480055: from=<>, size=2943, nrcpt=1 (queue active)
Aug 7 12:22:05 [postfix/qmgr] 8F93E480054: removed
Aug 7 12:22:06 [postfix/smtp] B48FC480055: to=<xxx@xxx.net>, relay=mx0.xxx.de[xxx.xxx.xxx.xxx], delay=1, status=sent (250 2.6.0 {mx003} Message accepted)
Aug 7 12:22:06 [postfix/qmgr] B48FC480055: removed |
|
Back to top |
|
|
magic919 Advocate
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Sun Aug 07, 2005 10:30 am Post subject: |
|
|
Likely to be in alias_maps I'd say. Root ought to be aliased to a normal user in the alias_database. |
|
Back to top |
|
|
freigeist Guru
Joined: 26 Jan 2004 Posts: 338 Location: Cologne, Germany
|
Posted: Sun Aug 07, 2005 10:42 am Post subject: |
|
|
argh...my fault...
I'm using a mysql database for my aliases...and there is that root@domain.com...stupid me....
trying to fix it now.. |
|
Back to top |
|
|
freigeist Guru
Joined: 26 Jan 2004 Posts: 338 Location: Cologne, Germany
|
Posted: Sun Aug 07, 2005 10:44 am Post subject: |
|
|
changed the entry in the database...everythings working now! |
|
Back to top |
|
|
magic919 Advocate
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Sun Aug 07, 2005 10:54 am Post subject: |
|
|
Glad you got that sorted. |
|
Back to top |
|
|
|