Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
postfix ignores my aliases
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
schiotz
Apprentice
Apprentice


Joined: 20 Jan 2004
Posts: 206
Location: Denmark

PostPosted: Thu Mar 03, 2005 9:33 am    Post subject: postfix ignores my aliases Reply with quote

I apparently have a problem with postfix on two different machines. It ignores my aliases file (yes, I have run newaliases :)).

Apparently, the problem is that postfix first appends my domain to the address, before it looks in the aliases file. And then root@mydomain.dk no longer matches the line in aliases saying
root: myuser@mydomain.dk

Is there any way to make postfix look in aliases before appending the domain name?
Back to top
View user's profile Send private message
acasto
Apprentice
Apprentice


Joined: 06 Feb 2004
Posts: 236
Location: Durka-Durka-Stan

PostPosted: Thu Mar 03, 2005 11:36 am    Post subject: Reply with quote

Can you post your main.cf file?




- Adam
_________________
Leerrroooooyyyyyyyy JENKINS!!!!1111...................

"You know the Nazi's had pieces of flare.. that they made the Jews wear."
Back to top
View user's profile Send private message
schiotz
Apprentice
Apprentice


Joined: 20 Jan 2004
Posts: 206
Location: Denmark

PostPosted: Thu Mar 03, 2005 12:06 pm    Post subject: Reply with quote

acasto wrote:
Can you post your main.cf file?


Here it comes, stripped with
Code:
grep -v '^#' /etc/postfix/main.cf | grep '[^ ]'
to get rid of all the comments etc.

Code:

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
myorigin = $mydomain
inet_interfaces = localhost
mydestination = localhost, $myhostname, localhost.$mydomain
unknown_local_recipient_reject_code = 550
mynetworks_style = host
relayhost = mail.$mydomain
debug_peer_level = 2
debug_peer_list = 127.0.0.1
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 = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /etc/postfix
readme_directory = /usr/share/doc/postfix-2.1.5-r2/readme
default_destination_concurrency_limit = 2
mail_spool_directory = /var/spool/mail
alias_database = hash:/etc/mail/aliases
local_destination_concurrency_limit = 2
alias_maps = hash:/etc/mail/aliases


It is only minimally modified. BTW, I use the latest stable postfix:
Code:
root # etcat -v postfix
[ Results for search key           : postfix ]
[ Candidate applications found : 4 ]

 Only printing found installed programs.

*  mail-mta/postfix :
        [   ] 2.1.5-r1 (0)
        [  I] 2.1.5-r2 (0)
        [M~ ] 2.2_beta20050218 (0)
        [M~ ] 2.2.0_rc1 (0)



/Jakob
Back to top
View user's profile Send private message
langthang
Retired Dev
Retired Dev


Joined: 27 Nov 2003
Posts: 620

PostPosted: Thu Mar 03, 2005 6:34 pm    Post subject: Reply with quote

try commented out myorigin = $mydomain?
_________________
Gentoo users' map
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Thu Mar 03, 2005 7:53 pm    Post subject: Reply with quote

myorigin = $mydomain? Great. But what does mydomain equal? You need to define mydomain...

Code:
mydomain = domain.tld
Back to top
View user's profile Send private message
schiotz
Apprentice
Apprentice


Joined: 20 Jan 2004
Posts: 206
Location: Denmark

PostPosted: Fri Mar 04, 2005 11:08 am    Post subject: Reply with quote

langthang wrote:
try commented out myorigin = $mydomain?

Ateo wrote:
myorigin = $mydomain? Great. But what does mydomain equal? You need to define mydomain...

Code:
mydomain = domain.tld


Thank you very much for your replies. Removing the myorigin line solved the problem - but it created a new one. Now the from address on mails contain the hostname of the machine, but that hostname depends on the DHCP server (this is a laptop), and bounces never make it back to me.

The $mydomain variable defaults to the current value of the domain name, so you do not have to set it. I had changed the myorigin line just before posting, it used to be my domain name (written explicitly), but that made no difference.

Thanks for your help!
Back to top
View user's profile Send private message
langthang
Retired Dev
Retired Dev


Joined: 27 Nov 2003
Posts: 620

PostPosted: Sat Mar 05, 2005 5:54 am    Post subject: Reply with quote

try this: http://www.postfix.org/postconf.5.html#masquerade_domains
_________________
Gentoo users' map
Back to top
View user's profile Send private message
schiotz
Apprentice
Apprentice


Joined: 20 Jan 2004
Posts: 206
Location: Denmark

PostPosted: Mon Mar 07, 2005 10:03 am    Post subject: Reply with quote

langthang wrote:
try this: http://www.postfix.org/postconf.5.html#masquerade_domains


Thank you very much! That solved my problem. :D

/Jakob
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum