#1  
Old 26th October 2007, 14:15
erebus erebus is offline
Member
 
Join Date: Sep 2007
Posts: 63
Thanks: 10
Thanked 8 Times in 8 Posts
Default Postfix delivery problem

Hello all,

The last days I noticed a weird problem related to postfix and its mail delivery. Before I start explaining the situation I want to say that I 've already searched for two days in the forum and found tons of problems related to the 'catchall' functionality and the local-host-names file. I don't know if this is the case for me, but I would try to explain the problem, pointing out what I have tested/changed so far.

First of all normal e-mail accounts seem to work well. The problem is with the 'catchall' functionality, especially when forwarding the 'catchall' account to a normal account. I.e.:

I have a website www.web.tld and a normal account info@web.tld. I have another website in ISPConfig, named www.city.tld and have set there a catchall account info@city.tld which forwards all mail to info@web.tld. The problem is that these catchall e-mails for city.tld are never delivered to info@web.tld but instead are delivered to the local root account!

The machine name is nemesis.web.tld, which is not set as a vhost in ISPConfig, and I also use the alias mail.web.tld which is not set as vhost too.

Here is my main.cf file:

Code:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
myhostname = nemesis.web.tld
mydomain = nemesis.web.tld
myorigin = nemesis.web.tld
inet_interfaces = all
unknown_local_recipient_reject_code = 550
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.2.10/samples
readme_directory = /usr/share/doc/postfix-2.2.10/README_FILES
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
mynetworks = 127.0.0.0/8
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names
Here is my hostname:

Code:
[erebus@nemesis ~]$ hostname
nemesis
[erebus@nemesis ~]$ hostname -f
nemesis.web.tld
Here is the contents of my local-host-names:

Code:
localhost
nemesis.web.tld
localhost.nemesis.web.tld
localhost.web.tld
localhost.localdomain
www.web.tld
web.tld
www.city.tld
city.tld
www.uni.tld
uni.tld

[...]
a bunch of other (www.)names.tld created by ISPConfig
[...]

#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
mail.web.tld
nemesis.web.tld is also the name I use in ISPConfig's setup (but there is NO vhost with that name). I 've also tried to use mail.web.tld instead of 'nemesis.web.tld' in master.cf but in vain.

Here are the relevant maillog entries:

Code:
Oct 26 15:01:15 nemesis postfix/cleanup[4065]: CD3A044022A: message-id=<4721D6BD.2090303@sh.tld>
Oct 26 15:01:15 nemesis postfix/qmgr[850]: CD3A044022A: from=<info@sh.tld>, size=1484, nrcpt=1 (queue active)
Oct 26 15:01:15 nemesis postfix/local[4207]: CD3A044022A: to=<root@nemesis.web.tld>, orig_to=<test@city.tld>, relay=local, delay=1, status=sent (delivered to mailbox)
Oct 26 15:01:15 nemesis postfix/qmgr[850]: CD3A044022A: removed
Oct 26 15:01:15 nemesis postfix/smtpd[3983]: disconnect from mx-out.for.tld[193.92.150.x]
[root@nemesis /var/mail]# tail -n 30 /var/log/maillog
Those 'root' mails, are stored in /var/mail where the 'root' file is increasing because of those deliveries:

Code:
[root@nemesis /var/mail]# l
total 2.1M
drwxrwxr-x   2 root mail 4.0K Oct 26 14:47 ./
drwxr-xr-x  14 root root 4.0K Sep 20 17:14 ../
-rw-------   1 root mail 2.1M Oct 26 14:47 root
However catchall for other domains seem to work, i.e.:

Code:
Oct 26 14:04:48 nemesis postfix/local[2648]: 5A190440228: to=<web.tld_info@nemesis.web.tld>, orig_to=<info@uni.tld>, relay=local, delay=18, status=sen
t (delivered to command: /usr/bin/procmail -f-)
Oct 26 14:04:48 nemesis postfix/qmgr[850]: 5A190440228: removed
(uni.tld has a catchall for info@web.tld too).

Also, DNS and MX records are in place for all the above domains.

Any ideas are very welcome as this is a production server and I don't know what else to do (not any experience with postfix too).

P.S. In the above logs I have changed the real domains for obvious reasons; however I have changed them carefully and each one represents the real one.

Last edited by erebus; 26th October 2007 at 14:18.
Reply With Quote
Sponsored Links
  #2  
Old 26th October 2007, 22:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Do you have any aliases in the postfix aliases file?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
AbannyvabVask (17th December 2013)
  #3  
Old 27th October 2007, 02:00
erebus erebus is offline
Member
 
Join Date: Sep 2007
Posts: 63
Thanks: 10
Thanked 8 Times in 8 Posts
Default

Here are the contents of the /etc/aliases file:

Code:
#
#  Aliases in this file will NOT be expanded in the header from
#  Mail, but WILL be visible over networks or from /bin/mail.
#
#       >>>>>>>>>>      The program "newaliases" must be run after
#       >> NOTE >>      this file is updated for any changes to
#       >>>>>>>>>>      show through to sendmail.
#

# Basic system aliases -- these MUST be present.
mailer-daemon:  postmaster
postmaster:     root

# General redirections for pseudo accounts.
bin:            root
daemon:         root
adm:            root
lp:             root
sync:           root
shutdown:       root
halt:           root
mail:           root
news:           root
uucp:           root
operator:       root
games:          root
gopher:         root
ftp:            root
nobody:         root
radiusd:        root
nut:            root
dbus:           root
vcsa:           root
canna:          root
wnn:            root
rpm:            root
nscd:           root
pcap:           root
apache:         root
webalizer:      root
dovecot:        root
fax:            root
quagga:         root
radvd:          root
pvm:            root
amanda:         root
privoxy:        root
ident:          root
named:          root
xfs:            root
gdm:            root
mailnull:       root
postgres:       root
sshd:           root
smmsp:          root
postfix:        root
netdump:        root
ldap:           root
squid:          root
ntp:            root
mysql:          root
desktop:        root
rpcuser:        root
rpc:            root
nfsnobody:      root

ingres:         root
system:         root
toor:           root
manager:        root
dumper:         root
abuse:          root

# mailman aliases
mailman:        postmaster
mailman-owner:  mailman

newsadm:        news
newsadmin:      news
usenet:         news
ftpadm:         ftp
ftpadmin:       ftp
ftp-adm:        ftp
ftp-admin:      ftp
www:            webmaster
webmaster:      root
noc:            root
security:       root
hostmaster:     root
info:           postmaster
marketing:      postmaster
sales:          postmaster
support:        postmaster

# trap decode to catch security attacks
decode:         root

# Person who should get root's mail
#root:          marc
I think I don't have any other aliases file on my system. Here are the contents of /etc/postfix to verify:

Code:
[root@nemesis /etc/postfix]# l
total 336K
drwxr-xr-x   3 root root 4.0K Oct 22 11:42 ./
drwxr-xr-x  75 root root  12K Oct 26 16:29 ../
-rw-r--r--   1 root root  16K Jul 21 14:42 access
-rw-r--r--   1 root root  11K Jul 21 14:42 canonical
-rw-r--r--   1 root root 9.4K Jul 21 14:42 generic
-rw-r--r--   1 root root  17K Jul 21 14:42 header_checks
-rw-r--r--   1 root root  12K Jul 21 14:42 LICENSE
-rw-r--r--   1 root root 1.6K Oct 26 16:29 local-host-names
-rw-r--r--   1 root root 1.6K Oct 26 16:29 local-host-names~
-rw-r--r--   1 root root  27K Oct 26 12:32 main.cf
-rw-r--r--   1 root root  14K Jul 21 14:42 main.cf.default
-rw-r--r--   1 root root  27K Sep 25 04:39 main.cf.orig
-rw-r--r--   1 root root 1.3K Jul 21 14:42 makedefs.out
-rw-r--r--   1 root root 4.1K Jul 21 14:42 master.cf
-rw-r--r--   1 root root  17K Jul 21 14:42 postfix-files
-rwxr-xr-x   1 root root 6.3K Jul 21 14:42 postfix-script*
-rwxr-xr-x   1 root root  22K Jul 21 14:42 post-install*
-rw-------   1 root root 1.0K Oct 27 02:30 prng_exch
-rw-r--r--   1 root root 6.4K Jul 21 14:42 relocated
drwxr-xr-x   2 root root 4.0K Sep 29 05:11 ssl/
-rw-r--r--   1 root root 1.6K Jul 21 14:42 TLS_LICENSE
-rw-r--r--   1 root root  11K Jul 21 14:42 transport
-rw-r--r--   1 root root  12K Jul 21 14:42 virtual
-rw-r--r--   1 root root  13K Oct 26 16:29 virtusertable
-rw-r--r--   1 root root  13K Oct 26 16:29 virtusertable~
-rw-r--r--   1 root root  24K Oct 26 16:29 virtusertable.db
Thank you very much in advance for helping me on this...
Reply With Quote
  #4  
Old 27th October 2007, 11:48
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

You should clean up your aliases file, I recommend to remove at least the following lines:

info: postmaster
marketing: postmaster
sales: postmaster
support: postmaster

and then run:

postmap /etc/aliases
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
erebus (28th October 2007)
  #5  
Old 28th October 2007, 16:08
erebus erebus is offline
Member
 
Join Date: Sep 2007
Posts: 63
Thanks: 10
Thanked 8 Times in 8 Posts
Default

I commented out the lines you suggested, but when I run postmap I get the following:

Code:
[root@nemesis ~]# postmap /etc/aliases
postmap: warning: /etc/aliases, line 11: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 14: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 15: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 16: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 17: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 18: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 19: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 20: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 21: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 22: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 23: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 24: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 25: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 26: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 27: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 28: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 29: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 30: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 31: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 32: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 33: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 34: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 35: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 36: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 37: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 38: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 39: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 40: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 41: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 42: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 43: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 44: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 45: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 46: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 47: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 48: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 49: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 50: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 51: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 52: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 53: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 54: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 55: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 56: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 57: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 58: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 59: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 60: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 61: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 62: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 63: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 64: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 66: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 67: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 68: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 69: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 70: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 71: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 74: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 75: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 77: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 78: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 79: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 80: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 81: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 82: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 83: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 84: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 85: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 86: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 87: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 88: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 97: record is in "key: value" format; is this an alias file?
postmap: warning: /etc/aliases, line 101: record is in "key: value" format; is this an alias file?
Any suggestions?

P.S. Also I forgot to mention that this /etc/aliases file is the default one, generated from Centos 4.5. I hadn't ever touched this file until today.
Reply With Quote
The Following User Says Thank You to erebus For This Useful Post:
AbannyvabVask (18th December 2013)
  #6  
Old 28th October 2007, 16:13
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Sorry, please run just the command:

newaliases

to update the aliases db file.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following 2 Users Say Thank You to till For This Useful Post:
AbannyvabVask (10th December 2013), erebus (28th October 2007)
  #7  
Old 28th October 2007, 16:20
erebus erebus is offline
Member
 
Join Date: Sep 2007
Posts: 63
Thanks: 10
Thanked 8 Times in 8 Posts
 
Default

After a quick investigation, postalias seemed to have done the trick instead of postmap:

Code:
[root@nemesis ~]# postalias /etc/aliases
[root@nemesis ~]# l /etc/aliases*
-rw-r--r--  1 root root  1.6K Oct 28 17:04 /etc/aliases
-rw-r-----  1 root smmsp  12K Oct 28 17:13 /etc/aliases.db
Code:
Oct 28 17:14:43 nemesis postfix/local[16232]: E6FD24405A1: to=<web.tld_info@nemesis.web.tld>, orig_to=<test@city.tld>, relay=local, delay=16, status=sent (delivered to command: /usr/bin/procmail -f-)
Success! Further investigation to follow. Thank you very much for your help till!

P.S. For the records, here is the difference between postmap and postalias (taken from the man pages):

postmap:
Quote:
INPUT FILE FORMAT
The format of a lookup table input file is as follows:

A table entry has the form

key whitespace value
postalias:
Quote:
DESCRIPTION
The postalias(1) command creates or queries one or more Postfix alias databases, or updates an existing one. The input and output file formats are
expected to be compatible with Sendmail version 8, and are expected to be suitable for the use as NIS alias maps.
Thanks once more!

Edit: 'newaliases' also ran with no errors - I hope it is the same as the postalias I mentioned above.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 17:58
Postfix Email Delivery Problem sedat1903 HOWTO-Related Questions 2 22nd December 2008 11:19
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36
Postfix problem or no? blackbeard Server Operation 1 28th July 2006 09:12


All times are GMT +2. The time now is 21:36.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.