View previous topic :: View next topic |
Author |
Message |
schiotz Apprentice
Joined: 20 Jan 2004 Posts: 206 Location: Denmark
|
Posted: Thu Mar 03, 2005 9:33 am Post subject: postfix ignores my aliases |
|
|
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 |
|
|
acasto Apprentice
Joined: 06 Feb 2004 Posts: 236 Location: Durka-Durka-Stan
|
Posted: Thu Mar 03, 2005 11:36 am Post subject: |
|
|
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 |
|
|
schiotz Apprentice
Joined: 20 Jan 2004 Posts: 206 Location: Denmark
|
Posted: Thu Mar 03, 2005 12:06 pm Post subject: |
|
|
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 |
|
|
langthang Retired Dev
Joined: 27 Nov 2003 Posts: 620
|
Posted: Thu Mar 03, 2005 6:34 pm Post subject: |
|
|
try commented out myorigin = $mydomain? _________________ Gentoo users' map |
|
Back to top |
|
|
Ateo Advocate
Joined: 02 Jun 2003 Posts: 2022 Location: Vegas Baby!
|
Posted: Thu Mar 03, 2005 7:53 pm Post subject: |
|
|
myorigin = $mydomain? Great. But what does mydomain equal? You need to define mydomain...
Code: | mydomain = domain.tld |
|
|
Back to top |
|
|
schiotz Apprentice
Joined: 20 Jan 2004 Posts: 206 Location: Denmark
|
Posted: Fri Mar 04, 2005 11:08 am Post subject: |
|
|
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 |
|
|
langthang Retired Dev
Joined: 27 Nov 2003 Posts: 620
|
|
Back to top |
|
|
schiotz Apprentice
Joined: 20 Jan 2004 Posts: 206 Location: Denmark
|
Posted: Mon Mar 07, 2005 10:03 am Post subject: |
|
|
Thank you very much! That solved my problem.
/Jakob |
|
Back to top |
|
|
|