PDA

View Full Version : Email aliases problem


rosa hsiao
9th December 2005, 10:41
I can send email with "web1_pink@test.com" or its alias name "pink@test.com". But I can only receive reply email to web1_pink@test.com. If the sender puts "pink@test.com" as recipient,I can't receive the email and the maillog looks like:

Dec 9 16:26:37 server1 postfix/smtpd[20380]: connect from webmsr1.webmail.hinet.net[61.220.15.201]
Dec 9 16:26:37 server1 postfix/smtpd[20380]: NOQUEUE: reject: RCPT from webmsr1.webmail.hinet.net[61.220.15.201]: 550 <pink@test.com>: Recipient address rejected: User unknown in local recipient table; from=<bytelib@ms2.hinet.net> to=<pink@test.com> proto=ESMTP helo=<webmsr1.webmail.hinet.net>
Dec 9 16:26:52 server1 postfix/smtpd[20380]: disconnect from webmsr1.webmail.hinet.net[61.220.15.201]
Dec 9 16:27:04 server1 ipop3d[20392]: pop3 service init from 127.0.0.1
Dec 9 16:27:04 server1 ipop3d[20392]: Login user=web1_pink host=server1.bytelib.com.tw [127.0.0.1] nmsgs=1/1
Dec 9 16:27:04 server1 ipop3d[20392]: Logout user=web1_pink host=server1.test.com [127.0.0.1] nmsgs=1 ndele=0

Should I install vm-pop3 instead of ipop3 to get the problem solved?

till
9th December 2005, 11:25
Is pink@test.com in your /etc/postfix/virtusertable?

Do you have this line in your postfix main.cf?

virtual_maps = hash:/etc/postfix/virtusertable

rosa hsiao
9th December 2005, 14:38
Is pink@test.com in your /etc/postfix/virtusertable?

Do you have this line in your postfix main.cf?

virtual_maps = hash:/etc/postfix/virtusertable

Yes. I have the following lines in /etc/postfix/virtusertable:
web1_pink@test.com
pink@test.com
web1_pink@www.test.com
pink@www.test.com

And I have this line in main.cf:
virtual_maps = hash:/etc/postfix/virtusertable

till
9th December 2005, 16:36
And the domain test.com is in your /etc/postfix/local-host-names and you have this line in your main.cf too:

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

rosa hsiao
10th December 2005, 02:56
And the domain test.com is in your /etc/postfix/local-host-names and you have this line in your main.cf too:

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

The domain test.com is in my /etc/postfix/local-host-names and I find a line in main.cf:
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, www.$mydomain, ftp.$mydomain

So I change it to
mydestination = /etc/postfix/local-host-names

I will let you know if this will solve the problem.

I also have the following lines in main.cf:
alias_maps = hash:/etc/aliases
virtual_maps = hash:/etc/postfix/virtusertable

rosa hsiao
10th December 2005, 03:33
The domain test.com is in my /etc/postfix/local-host-names and I find a line in main.cf:
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, www.$mydomain, ftp.$mydomain

So I change it to
mydestination = /etc/postfix/local-host-names

I will let you know if this will solve the problem.

I also have the following lines in main.cf:
alias_maps = hash:/etc/aliases
virtual_maps = hash:/etc/postfix/virtusertable

Finally I can receive emails for both web1_pink@test.com and alias email pink@test.com. I can send emails of other domain name such as web2_sale@test2.com. But I can't receive alias email for sale@test2.com.


Which parameter do I need to modify in main.cf ?

mynetworks = 127.0.0.0/8
or
mynetworks = 192.168.1.0/24 ???


mynetworks_style = subnet
or
mynetworks_style = host ???

falko
10th December 2005, 14:37
Finally I can receive emails for both web1_pink@test.com and alias email pink@test.com. I can send emails of other domain name such as web2_sale@test2.com. But I can't receive alias email for sale@test2.com.

Is sale@test2.com in /etc/postfix/virtusertable? Is test2.com in /etc/postfix/local-host-names?


Which parameter do I need to modify in main.cf ?

mynetworks = 127.0.0.0/8
or
mynetworks = 192.168.1.0/24 ???


mynetworks_style = subnet
or
mynetworks_style = host ???
You don't have to change these parameters.

rosa hsiao
11th December 2005, 10:52
Is sale@test2.com in /etc/postfix/virtusertable? Is test2.com in /etc/postfix/local-host-names?

Yes. I have the following line in /etc/postfix/local-host-names:

web1_pink@www.test.com web1_pink
web1_pink@test.com web1_pink
pink@www.test.com web1_pink
pink@test.com web1_pink
web2_sale@www.test2.com web1_sale
web2_sale@test2.com web1_sale
sale@www.test2.com web1_sale
sale@test2.com web1_sale

I am using ipop3 daemon now. I also have installed vm-pop3,but not running it.



You don't have to change these parameters.

In my main.cf I have the following lines:
#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host
#mynetworks = 192.168.1.0/28, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table

Do you mean that I can just leave them alone and don't bother to change or comment out any of those lines?

falko
11th December 2005, 14:56
Yes. I have the following line in /etc/postfix/local-host-names:

web1_pink@www.test.com web1_pink
web1_pink@test.com web1_pink
pink@www.test.com web1_pink
pink@test.com web1_pink
web2_sale@www.test2.com web1_sale
web2_sale@test2.com web1_sale
sale@www.test2.com web1_sale
sale@test2.com web1_sale

:eek: These lines belong into /etc/postfix/virtusertable, not local-host-names!

I am using ipop3 daemon now. I also have installed vm-pop3,but not running it.
ipop3 uses mbox format, so make sure you disabled Maildir under Management -> Server -> Settings -> Email.




In my main.cf I have the following lines:
#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host
#mynetworks = 192.168.1.0/28, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table

Do you mean that I can just leave them alone and don't bother to change or comment out any of those lines?

Leave them unchanged for now.
I don't know if you've told us before, but what distribution do you use, and did you follow any of the "Perfect Setup" tutorials on HowtoForge?

rosa hsiao
12th December 2005, 04:35
:eek: These lines belong into /etc/postfix/virtusertable, not local-host-names!

Sorry for the mistake! My local-host-names has the following lines:

www.test.com
test.com
www.test2.com
test2.com

:eek:
ipop3 uses mbox format, so make sure you disabled Maildir under Management -> Server -> Settings -> Email.

I have already disabled Maildir!


:eek:
Leave them unchanged for now.
I don't know if you've told us before, but what distribution do you use, and did you follow any of the "Perfect Setup" tutorials on HowtoForge?

I have follow the "Perfect Setup for Fedora Core 3" tutorials on HowtoForge.
The reason for not using Fedora Core 4 is because FC4 doesn't run some applications such as PHPBB2 very smoothly.

falko
12th December 2005, 11:18
And what's in your mail log when you send mails to sale@test2.com?

If that's your /etc/postfix/virtusertable:

web1_pink@www.test.com web1_pink
web1_pink@test.com web1_pink
pink@www.test.com web1_pink
pink@test.com web1_pink
web2_sale@www.test2.com web1_sale
web2_sale@test2.com web1_sale
sale@www.test2.com web1_sale
sale@test2.com web1_sale then mails for sale@test2.com should arrive in web1_sale's mailbox.

rosa hsiao
12th December 2005, 11:36
And what's in your mail log when you send mails to sale@test2.com?

If that's your /etc/postfix/virtusertable:

then mails for sale@test2.com should arrive in web1_sale's mailbox.

I delete user web1_sale from web site "test.com" and create a user web2_sale for web site "test2.com.tw" and give it an alias name "sale". Now the problem get solved. Both web2_sale@test2.com and sale@test2.com can receive and send emails successfully.

Thnaks very much for your patience and help.

klaus++
21st September 2006, 17:01
Thanks a lot for the thread. :) I had a similar Problem. Finally I managed to solve it by deleting existing users and creating them again. Beforehand I had to activate Maildir in ISPConfig - in my case standard pop3 with user Maildirs is running under Postfix.