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 24th July 2006, 05:19
Davide Davide is offline
Senior Member
 
Join Date: Jul 2006
Posts: 123
Thanks: 16
Thanked 9 Times in 8 Posts
Question /etc/aliases deliver locally local domain users

Hi

I'm getting strange behaviour when I try to put any virtual domain address in /etc/aliases:

# /etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
root: david auriasistemas net

I'm obviously trying to forward all mailer-daemon@*, postmaster@* ... to the virtual account david auriasistemas net.

There is a local user "david", and all mail goes to /home/david/Maildir instead of /var/www/webX
This is the log of a message sent from root console to postmaster garabana com, another virtual domain:

Jul 24 03:41:47 eneri postfix/pickup[8995]: B3E9EBB3: uid=0 from=<root>
Jul 24 03:41:47 eneri postfix/cleanup[9265]: B3E9EBB3: message-id=<20060724014147.B3E9EBB3@eneri>
Jul 24 03:41:47 eneri postfix/qmgr[8996]: B3E9EBB3: from=<root eneri auriasistemas net>, size=311, nrcpt=1 (queue active)
Jul 24 03:41:47 eneri postfix/local[9267]: B3E9EBB3: to=<david auriasistemas net>, orig_to=<postmaster garabana com>, relay=local, delay=0, status=sent (delivered to maildir)
Jul 24 03:41:47 eneri postfix/qmgr[8996]: B3E9EBB3: removed


If I put any (I mean ANY, doesn't matter what is the virtual domain) other non-existent accout (f-ex. john auriasistemas net) in /etc/aliases, I get similar messages, ending with:

relay=local, delay=0, status=bounced (unknown user: "john")

If I put any other external address (for example a yahoo! account), all mail is forwarded OK

If I send mail directly to any virtual domain account, from external server, or locally with "mailx", all mail is delivered correctly

doesn't postfix understand virtual domains in /etc/aliases?
Is there any problem with my configuration?

Thanks in advance
Reply With Quote
Sponsored Links
  #2  
Old 24th July 2006, 13:17
Davide Davide is offline
Senior Member
 
Join Date: Jul 2006
Posts: 123
Thanks: 16
Thanked 9 Times in 8 Posts
Wink I forgot...

Relevant conf files (they seem OK):

###################################
#
# ISPConfig local-host-names Configuration File
# Version 1.0
#
###################################
localhost
eneri.auriasistemas.net
localhost.eneri.auriasistemas.net
localhost.auriasistemas.net
www.auriasistemas.net
www.enredo.net
www.garabana.com
auriasistemas.net
enredo.net
garabana.com
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####







************************************************** *******************

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myhostname = eneri
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = eneri.auriasistemas.net, localhost.auriasistemas.net, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
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
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
home_mailbox = Maildir/

virtual_maps = hash:/etc/postfix/virtusertable

mydestination = /etc/postfix/local-host-names


************************************************** *******************

###################################
#
# ISPConfig virtusertable Configuration File
# Version 1.0
#
###################################
daniel@www.spauriasistemas.net web4_daniel
web4_daniel@www.spauriasistemas.net web4_daniel
david@www.spenredo.net web3_david
web3_david@www.spenredo.net web3_david
david@spenredo.net web3_david
web3_david@spenredo.net web3_david
david@ web3_david
web3_david@ web3_david
david@www.spauriasistemas.net web4_david
web4_david@www.spauriasistemas.net web4_david
david@www.spgarabana.com web5_david
web5_david@www.spgarabana.com web5_david
david@spgarabana.com web5_david
web5_david@spgarabana.com web5_david
shakazulu@www.spenredo.net web3_shakazulu
web3_shakazulu@www.spenredo.net web3_shakazulu
shakazulu@spenredo.net web3_shakazulu
web3_shakazulu@spenredo.net web3_shakazulu
shakazulu@ web3_shakazulu
web3_shakazulu@ web3_shakazulu
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####


Intentionally added "sp" before domains

This problem is getting me mad!

Last edited by Davide; 24th July 2006 at 13:25.
Reply With Quote
  #3  
Old 24th July 2006, 13:44
todvard todvard is offline
Member
 
Join Date: Aug 2005
Posts: 85
Thanks: 1
Thanked 6 Times in 5 Posts
Default

Hi, i can not see david auriasistemas net email address in your virtusertable file, are you sure it is exist?
Reply With Quote
  #4  
Old 24th July 2006, 15:23
Davide Davide is offline
Senior Member
 
Join Date: Jul 2006
Posts: 123
Thanks: 16
Thanked 9 Times in 8 Posts
Default

It is there. I suppose I accidentaly deleted it obfuscating e-mails

I post it again

###################################
#
# ISPConfig virtusertable Configuration File
# Version 1.0
#
###################################
daniel@www.spauriasistemas.net web4_daniel
web4_daniel@www.spauriasistemas.net web4_daniel
daniel@spauriasistemas.net web4_daniel
web4_daniel@spauriasistemas.net web4_daniel
david@www.spenredo.net web3_david
web3_david@www.spenredo.net web3_david
david@spenredo.net web3_david
web3_david@spenredo.net web3_david
david@ web3_david
web3_david@ web3_david
david@www.spauriasistemas.net web4_david
web4_david@www.spauriasistemas.net web4_david
david@spauriasistemas.net web4_david
web4_david@spauriasistemas.net web4_david
david@www.spgarabana.com web5_david
web5_david@www.spgarabana.com web5_david
david@spgarabana.com web5_david
web5_david@spgarabana.com web5_david
shakazulu@www.spenredo.net web3_shakazulu
web3_shakazulu@www.spenredo.net web3_shakazulu
shakazulu@spenredo.net web3_shakazulu
web3_shakazulu@spenredo.net web3_shakazulu
shakazulu@ web3_shakazulu
web3_shakazulu@ web3_shakazulu
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####


BTW, it doesn't matter which virtual user I put in /etc/aliases. Postfix allways tries to deliver locally. If there isn't local user matching virtual user, mail is lost.

The postfix log after sending a message directly from root console to virtualuser:

Jul 24 14:34:27 eneri postfix/pickup[3118]: BC086A11: uid=0 from=<root>
Jul 24 14:34:27 eneri postfix/cleanup[3357]: BC086A11: message-id=<20060724123427.BC086A11@eneri>
Jul 24 14:34:27 eneri postfix/qmgr[3119]: BC086A11: from=<root eneri spauriasistemas net>, size=287, nrcpt=1 (queue active)
Jul 24 14:34:27 eneri postfix/pickup[3118]: D2B08B42: uid=10018 from=<web4_david>
Jul 24 14:34:27 eneri postfix/cleanup[3357]: D2B08B42: message-id=<20060724123427.D2B08B42@eneri>
Jul 24 14:34:27 eneri postfix/qmgr[3119]: D2B08B42: from=<web4_david eneri spauriasistemas net>, size=359, nrcpt=1 (queue active)
Jul 24 14:34:27 eneri postfix/local[3359]: BC086A11: to=<web4_david eneri spauriasistemas net>, orig_to=<david spauriasistemas net>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
Jul 24 14:34:27 eneri postfix/qmgr[3119]: BC086A11: removed
Jul 24 14:34:27 eneri postfix/local[3377]: D2B08B42: to=<admispconfig@localhost>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
Jul 24 14:34:27 eneri postfix/qmgr[3119]: D2B08B42: removed



************************************************** ***********************

And postfix log after changing /etc/aliases to redirect mail to "shakazulu spenredo net"

Jul 24 14:42:54 eneri postfix/pickup[3607]: 506F1A11: uid=0 from=<root>
Jul 24 14:42:54 eneri postfix/cleanup[3614]: 506F1A11: message-id=<20060724124254.506F1A11@eneri>
Jul 24 14:42:54 eneri postfix/qmgr[3608]: 506F1A11: from=<root eneri spauriasistemas net>, size=292, nrcpt=1 (queue active)
Jul 24 14:42:54 eneri postfix/local[3616]: 506F1A11: to=<shakazulu spenredo net>, orig_to=<postmaster spauriasistemas net>, relay=local, delay=0, status=bounced (unknown user: "shakazulu")
Jul 24 14:42:54 eneri postfix/cleanup[3614]: 64BDDB42: message-id=<20060724124254.64BDDB42@eneri>
Jul 24 14:42:54 eneri postfix/qmgr[3608]: 64BDDB42: from=<>, size=1959, nrcpt=1 (queue active)
Jul 24 14:42:54 eneri postfix/qmgr[3608]: 506F1A11: removed
Jul 24 14:42:54 eneri postfix/local[3616]: 64BDDB42: to=<shakazulu spenredo net>, orig_to=<root eneri spauriasistemas net>, relay=local, delay=0, status=bounced (unknown user: "shakazulu")
Jul 24 14:42:54 eneri postfix/qmgr[3608]: 64BDDB42: removed


Thank you

Last edited by Davide; 24th July 2006 at 17:09.
Reply With Quote
  #5  
Old 24th July 2006, 16:14
todvard todvard is offline
Member
 
Join Date: Aug 2005
Posts: 85
Thanks: 1
Thanked 6 Times in 5 Posts
Default

Try to add this to main.cf:
virtual_maps = hash:/etc/postfix/virtusertable,hash:/etc/aliases
then reload postfix and let's see whats gonna happen.
Reply With Quote
  #6  
Old 24th July 2006, 17:12
Davide Davide is offline
Senior Member
 
Join Date: Jul 2006
Posts: 123
Thanks: 16
Thanked 9 Times in 8 Posts
Default

It solved my problem, thank you very much!

It was my fault or is an ISPconfig bug?

Should I open a bug?
Reply With Quote
  #7  
Old 25th July 2006, 14:19
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

Quote:
Originally Posted by Davide
It was my fault or is an ISPconfig bug?
It's working on thousands of other installations, so it is not a bug.
__________________
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
  #8  
Old 21st September 2006, 01:41
bruma bruma is offline
Member
 
Join Date: Aug 2006
Location: Slovenia
Posts: 33
Thanks: 4
Thanked 0 Times in 0 Posts
Send a message via ICQ to bruma
Default

Quote:
Originally Posted by todvard
Try to add this to main.cf:
virtual_maps = hash:/etc/postfix/virtusertable,hash:/etc/aliases
then reload postfix and let's see whats gonna happen.
FYI, this setting (in bold) solved almost the same problem.

I have this in /etc/aliases
Quote:
root: web1_bruma
but mail for root mysteriously end up in account web1_spam, which is configured with CatchAll rule. Without CatchAll rule then mail was delivered to right account web1_bruma.
So conclusion could be that with CatchAll turned on, postfix ignores /etc/aliases!?
Is this a bug?
Reply With Quote
  #9  
Old 21st September 2006, 12:47
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 37,037
Thanks: 841
Thanked 5,659 Times in 4,466 Posts
Default

Please have a look here:

http://www.howtoforge.com/faq/9_33_en.html
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 21st September 2006, 13:38
bruma bruma is offline
Member
 
Join Date: Aug 2006
Location: Slovenia
Posts: 33
Thanks: 4
Thanked 0 Times in 0 Posts
Send a message via ICQ to bruma
 
Default

Yes I already checked that, variable $mydomain is empty.
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
Roaming Profile Error with Samba Domain Controller Setup noahlau HOWTO-Related Questions 6 8th March 2008 19:33
Problems with the Virtual Users And Domains With Postfix, Courier And MySQL tutorial wwinfrey HOWTO-Related Questions 12 15th August 2006 17:38
local users shared directory guidovanh Installation/Configuration 1 15th March 2006 20:30
Virtual Users and Domain with Postfix etc - Problems after updating postfix ryv HOWTO-Related Questions 7 23rd November 2005 00:56
postfix config jmroth Installation/Configuration 6 18th September 2005 16:58


All times are GMT +2. The time now is 12:14.


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