
9th March 2007, 18:40
|
|
Junior Member
|
|
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Postfix not honoring email aliases for local delivery
I have a hosting server, configured as per the Perfect Setup (Opensuse 10), with ISPConfig installed. Everything seems to be working - uptime has been over a month, now, with the only problems I've had so far being domain registration hiccups which have nothing to do with my server.
However, one of my customers is testing a web order form, and I've run into a problem: while emails incoming from outside servers work fine, local deliveries don't seem to be using email aliases properly.
Eg.
Username: example.admin
Primary email: example.admin@example.com
Alias: info@example.com
If I send an email to info@example.com from outside, it works without a problem. If I send it from an another domain also hosted on the site, admin@example2.com, it bounces back with the following error:
Quote:
|
This is the Postfix program at host main.example.com. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to <postmaster> If you do so, please include this problem report. You can delete your own text from the attached returned message. The Postfix program <info@example.com>: unknown user: "info"
|
I checked all the threads on Postfix problems I could, and the following have already been ruled out:
- The server's FQDN is main.example.com
- The $myhostname parameter in main.cf is main.example.com
- main.example.com is not used as a virtual domain for any email or web services. www.example.com and example.com are, however.
- All DNS entries are correct. Again, outside email works fine with the alias rewriting.
- alias_maps = hash:/etc/aliases
- virtual_maps = hash:/etc/postfix/virtusertable
- mydestination = /etc/postfix/local-host-names
- example.admin@example.com and info@example.com are both present in /etc/postfix/virtusertable and point to example.admin
- example.com is listed in /etc/postfix/local-host-names
Any help would be greatly appreciated!
|

10th March 2007, 11:59
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,594 Times in 2,445 Posts
|
|
What's in your mail log when this happens?
|

10th March 2007, 15:37
|
|
Junior Member
|
|
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Here's /var/log/mail (snippet):
Quote:
Mar 10 09:28:11 main imapd: Connection, ip=[::ffff:127.0.0.1]
Mar 10 09:28:11 main imapd: LOGIN, user=admin, ip=[::ffff:127.0.0.1], protocol=IMAP
Mar 10 09:28:11 main postfix/sendmail[27970]: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
Mar 10 09:28:11 main postfix/sendmail[27970]: warning: inet_protocols: configuring for IPv4 support only
Mar 10 14:28:11 main postfix/postdrop[27974]: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
Mar 10 14:28:11 main postfix/postdrop[27974]: warning: inet_protocols: configuring for IPv4 support only
Mar 10 09:28:11 main postfix/cleanup[27978]: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
Mar 10 09:28:11 main postfix/cleanup[27978]: warning: inet_protocols: configuring for IPv4 support only
Mar 10 09:28:11 main postfix/pickup[27598]: 6E8BF251B1B: uid=30 from=<admin@example.com>
Mar 10 09:28:11 main imapd: LOGOUT, user=admin, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=2332, sent=648, time=0
Mar 10 09:28:11 main postfix/trivial-rewrite[27982]: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
Mar 10 09:28:11 main postfix/trivial-rewrite[27982]: warning: inet_protocols: configuring for IPv4 support only
Mar 10 09:28:11 main postfix/cleanup[27978]: 6E8BF251B1B: message-id=<75c55d0680c4aa677d46294bc448fc5c@localhost>
Mar 10 09:28:11 main postfix/qmgr[14599]: 6E8BF251B1B: from=<admin@example.com>, size=2424, nrcpt=1 (queue active)
Mar 10 09:28:11 main postfix/local[27986]: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
Mar 10 09:28:11 main postfix/local[27986]: warning: inet_protocols: configuring for IPv4 support only
Mar 10 09:28:11 main postfix/bounce[27990]: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
Mar 10 09:28:11 main postfix/bounce[27990]: warning: inet_protocols: configuring for IPv4 support only
Mar 10 09:28:11 main imapd: Connection, ip=[::ffff:127.0.0.1]
Mar 10 09:28:11 main postfix/local[27986]: 6E8BF251B1B: to=<test@example.com>, relay=local, delay=0.43, delays=0.26/0.03/0/0.14, dsn=5.1.1, status=bounced (unknown user: "test")
Mar 10 09:28:11 main postfix/cleanup[27978]: BF3D7251B1C: message-id=<20070310142811.BF3D7251B1C@main.example.com>
Mar 10 09:28:11 main postfix/bounce[28000]: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
Mar 10 09:28:11 main postfix/bounce[28000]: warning: inet_protocols: configuring for IPv4 support only
Mar 10 09:28:11 main postfix/qmgr[14599]: BF3D7251B1C: from=<>, size=4302, nrcpt=1 (queue active)
Mar 10 09:28:11 main postfix/bounce[27990]: 6E8BF251B1B: sender non-delivery notification: BF3D7251B1C
Mar 10 09:28:11 main postfix/qmgr[14599]: 6E8BF251B1B: removed
Mar 10 09:28:11 main imapd: LOGIN, user=admin, ip=[::ffff:127.0.0.1], protocol=IMAP
Mar 10 09:28:11 main postfix/local[27986]: BF3D7251B1C: to=<admin@example.com>, relay=local, delay=0.18, delays=0.09/0/0/0.09, dsn=2.0.0, status=sent (delivered to maildir)
Mar 10 09:28:11 main postfix/qmgr[14599]: BF3D7251B1C: removed
|
test@example.com is an alias I've set up for admin@example.com.
Thanks
|

11th March 2007, 19:23
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,594 Times in 2,445 Posts
|
|
What's in /etc/postfix/main.cf (please strip out the comments), /etc/postfix/virtusertable, and /etc/postfix/local-host-names?
|

12th March 2007, 04:04
|
|
Junior Member
|
|
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
/etc/postfix/main.cf
Quote:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
myhostname = main.markanthonymedia.com
myorigin = $mydomain
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
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = maildrop
html_directory = /usr/share/doc/packages/postfix/html
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/packages/postfix/samples
readme_directory = /usr/share/doc/packages/postfix/README_FILES
inet_protocols = all
biff = no
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
program_directory = /usr/lib/postfix
inet_interfaces = all
masquerade_domains =
defer_transports =
mynetworks_style = subnet
disable_dns_lookups = no
relayhost =
mailbox_command =
mailbox_transport =
strict_8bitmime = no
disable_mime_output_conversion = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,check_ relay_domains
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = yes
smtpd_use_tls = yes
smtp_use_tls = yes
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
receive_override_options = no_address_mappings
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_tls_auth_only = no
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
mynetworks = 127.0.0.0/8
home_mailbox = Maildir/
|
/etc/postfix/local-host-names
/etc/postfix/virtusertable (snippet only - I don't want the users of twenty sites plastered all over the forums)
|

12th March 2007, 14:11
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,594 Times in 2,445 Posts
|
|
Ok, and now I need to know the real email addresses instead of test@example.com and admin@example.com.
|

12th March 2007, 15:55
|
|
Junior Member
|
|
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
In this case, so I wasn't cluttering anyone else's mailbox, I set up the username testing, which has test@markanthonymedia.com as an alias, just so I could confirm the behaviour with a fresh email. (The original user who noticed the problem is on another site I host.) The user testing then forwards to administrator@markanthonymedia.com.
The original notice was when a PHP script mailed to an alias - I got the undeliverable message error, since wwwrun's email forwards to me. I also tried sending to info@markanthonymedia.com, with the same result (info is an alias for markanthony).
|

13th March 2007, 19:00
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,594 Times in 2,445 Posts
|
|
What's in test@markanthonymedia.com .procmailrc file (in his homedir)?
Please run
Code:
postconf -e 'inet_protocols = ipv4'
/etc/init.d/postfix restart
to get rid of the inet_protocols warning in your mail log.
|

14th March 2007, 05:30
|
|
Junior Member
|
|
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks, I was wondering how to get that error out.
The user is testing, not test - perhaps I should've made it testuser or something. The email test@markanthonymedia.com is just an alias of testing@markanthonymedia.com.
The .procmailrc for testing, however, is as follows:
MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR
ORGMAIL=$MAILDIR
INCLUDERC=/srv/www/web1/user/testing/.mailsize.rc
## INCLUDERC=/srv/www/web1/user/testing/.quota.rc
## INCLUDERC=/srv/www/web1/user/testing/.antivirus.rc
## INCLUDERC=/srv/www/web1/user/testing/.local-rules.rc
## INCLUDERC=/srv/www/web1/user/testing/.html-trap.rc
## INCLUDERC=/srv/www/web1/user/testing/.spamassassin.rc
## INCLUDERC=/srv/www/web1/user/testing/.autoresponder.rc
|

14th March 2007, 22:26
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,594 Times in 2,445 Posts
|
|
And what's in the .forward file (in the same directory)?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 18:40.
|
|
Recent comments
17 hours 18 min ago
22 hours 23 min ago
1 day 2 hours ago
1 day 4 hours ago
1 day 18 hours ago
1 day 18 hours ago
1 day 23 hours ago
2 days 6 hours ago
2 days 7 hours ago
2 days 8 hours ago