LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-12-2013, 02:52 PM   #1
CeSinge
LQ Newbie
 
Registered: Feb 2013
Location: East of Brussels, Belgium
Distribution: debian 2.6.32-5-xen-amd64 at Rackspace.com
Posts: 5

Rep: Reputation: 0
postfix ignores /etc/aliases


Hello,

I want postfix to sent e-mails to root or postmaster to another e-mail address.
So I have the following in /etc/aliases :

root@ secumailtest:/var/log# more /etc/aliases
# See man 5 aliases for format
postmaster: francois.lagrange@ securendo.com
abuse: francois.lagrange@ securendo.com
root: francois.lagrange@ securendo.com

Still, notifications to root are not sent to francois.lagrange@ securendo.com, but rather to root@ cesinge.com. cesinge.com is the domain of the server, the only entry in the mysql mail database.

mysql> select * from domains;
+-------------+
| domain |
+-------------+
| cesinge.com |
+-------------+
1 row in set (0.00 sec)


Postfix is otherwise configured to use /etc/aliases.

root@secumailtest:/var/log# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no


So why is postfix ignoring the aliases and sending these notifications to root@ local domain instead of the defined alias?
I did a newaliases.

Note: I added a space after the '@' because the site's editor stubbornly converts them to clickable e-mail addresses...


Thank you,
 
Old 04-14-2013, 07:49 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,747

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
I'm also running Debian. Your /etc/aliases looks very different from mine.
Yours:
Code:
root@ secumailtest:/var/log# more /etc/aliases
 # See man 5 aliases for format
 postmaster: francois.lagrange@ securendo.com
 abuse: francois.lagrange@ securendo.com
 root: francois.lagrange@ securendo.com
Mine:
Code:
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
And for your host domain:
Code:
Still, notifications to root are not sent to francois.lagrange@ securendo.com, 
but rather to root@ cesinge.com. cesinge.com is the domain of the server, 
the only entry in the mysql mail database.

 mysql> select * from domains;
 +-------------+
 | domain |
 +-------------+
 | cesinge.co
What do you have in /etc/hosts?
 
Old 04-15-2013, 02:52 AM   #3
CeSinge
LQ Newbie
 
Registered: Feb 2013
Location: East of Brussels, Belgium
Distribution: debian 2.6.32-5-xen-amd64 at Rackspace.com
Posts: 5

Original Poster
Rep: Reputation: 0
bigrigdriver,

This is /etc/hosts. There's not much in it.
Code:
cesinge@secumailtest:~$ more /etc/hosts
127.0.0.1       localhost

[IPv6 standard lines skipped]
95.138.172.242  secumailtest.cesinge.com        secumailtest
10.179.70.42          secumailtest.cesinge.com        secumailtest
127.0.1.1             secumailtest.cesinge.com        secumailtest
2a00:1a48:7805:0113:0e13:f616:ff08:3f99 secumailtest.cesinge.com        secumailtest
/etc/hostname contains just the line
secumailtest - that's all.
It seems that Postfix or SpamAssassin just ignore /etc/aliases (and also the postfix forwardings table). I see that all notification mails are always sent to and from root@cesinge.com. I assume that root is because that's the user running postfix and spamassassin. And I guess @cesinge.com because it's the DNS domain to which the machine belongs?
What bothers me is that I don't have a clear understanding of how this works. Then I could consider tweaking something to force these mails to a mailbox that I read.
 
Old 04-15-2013, 03:37 AM   #4
CeSinge
LQ Newbie
 
Registered: Feb 2013
Location: East of Brussels, Belgium
Distribution: debian 2.6.32-5-xen-amd64 at Rackspace.com
Posts: 5

Original Poster
Rep: Reputation: 0
Testing this further, I replaced all the .cesinge.com in the hosts file by .securendo.com, to see if these would be used when system root mails are sent.
I then sent a mail to just root: mail root

The mail cannot be delivered, because the machine, secumailtest, cannot be resolved (no A record) in that other domain securendo.com (normal).

While the mail to root itself fails, the system still manages to send me an undelivered mail notification root@cesinge.com! So I have to conclude that this @cesinge.com is somehow forced in there for system generated messages. I does not come from the host file. It ignores any modification from the aliases or forwardings. From where does this adres root@cesinge.com come, then? <puzzled>
 
  


Reply

Tags
postfix


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix recipent aliases gabsik Linux - Server 2 03-14-2009 07:56 PM
Sendmail ignores aliases with sendmail daemon stopped phavn Solaris / OpenSolaris 1 12-01-2008 02:50 PM
Postfix with pop3 AND aliases Jeozp Linux - Server 4 06-21-2007 10:24 AM
qmail ignores aliases with DASHES (-) in them.. why? ivj Linux - Software 0 07-30-2004 04:20 PM
Postfix aliases riotpunk Linux - Software 1 07-23-2004 03:39 AM


All times are GMT -5. The time now is 10:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration