Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 9th March 2007, 18:40
rneilson rneilson is offline
Junior Member
 
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!
Reply With Quote
Sponsored Links
  #2  
Old 10th March 2007, 11:59
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

What's in your mail log when this happens?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 10th March 2007, 15:37
rneilson rneilson is offline
Junior Member
 
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #4  
Old 11th March 2007, 19:23
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

What's in /etc/postfix/main.cf (please strip out the comments), /etc/postfix/virtusertable, and /etc/postfix/local-host-names?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 12th March 2007, 04:04
rneilson rneilson is offline
Junior Member
 
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

/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
Quote:
localhost
main.markanthonymedia.com
localhost.main.markanthonymedia.com
localhost.markanthonymedia.com
localhost.localdomain
www.markanthonymedia.com
www.stylistschoice.ca
www.barberschoice.ca
www.clarissa-santiago.net
mail.markanthonymedia.com
www.phyne.ca
www.artefis.com
www.recaredy.com
www.estheticschoice.ca
www.alleynohhh.com
www.pulpmag.net
www.phynemodelagency.com
www.esb.ca
www.digitalmindmedia.ca
markanthonymedia.com
mail.clarissa-santiago.net
webmail.markanthonymedia.com
clarissa-santiago.net
phyne.ca
mail.phyne.ca
barberschoice.ca
stylistchoice.ca
artefis.com
mail.artefis.com
recaredy.com
estheticschoice.ca
mail.recaredy.com
alleynohhh.com
pulpmag.net
phynemodelagency.com
esb.ca
digitalmindmedia.ca
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
/etc/postfix/virtusertable (snippet only - I don't want the users of twenty sites plastered all over the forums)

Reply With Quote
  #6  
Old 12th March 2007, 14:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Ok, and now I need to know the real email addresses instead of test@example.com and admin@example.com.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 12th March 2007, 15:55
rneilson rneilson is offline
Junior Member
 
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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).
Reply With Quote
  #8  
Old 13th March 2007, 19:00
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 14th March 2007, 05:30
rneilson rneilson is offline
Junior Member
 
Join Date: Mar 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #10  
Old 14th March 2007, 22:26
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
 
Default

And what's in the .forward file (in the same directory)?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
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 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
Can't receive email for aliases sbecker Installation/Configuration 10 4th April 2006 16:51
Delivery failure when using aliases ggouts Server Operation 2 20th February 2006 09:17


All times are GMT +2. The time now is 22:18.


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