Postfix Mail Server.. Please advice
Hi to all,
i have just setup a new mail server running on RHEL 4 and postfix 2.1.5. i got it up running with dovecot and squirrelmail (thru apache). i am able to send and receive for testing. [/b]my questions is:-[/b] when client receive email from sender. it will show like this:- username@localhost.mydomain.com example: john@localhost.linuxforum.com How can i elimiate the localhost right after the @ ? i just it to be john@linuxforum.com. Sorry, i am not able to show my conf file because the room where the pc is located at is locked. Please advice.. Many Thanks rgds. Lim |
Have you tried changing $myorigin in postfix's main.cf config file?
If postfix listens to port 25 on the "localhost" interface, it may assume "localhost.yourDomain" as fully qualified hostname. You could also try playing around with /etc/hosts, altough I don't recommend that, as Postfix may get confused. Code:
man trivial-rewrite |
thanks for your reply. i appreciate that :-)
i have set:- myhostname = mail.aaa.com mydomain = aaa.com myorigin = $mydomain but still the output show localhost in my /etc/hosts i have 127.0.0.1 localhost.localdomain mail.aaa.com localhost please help me~ |
You could try putting "mail.aaa.com" ahead of "localhost.localdomain", but I doubt that will change anything.
Also, maybe you can try omitting "mail.aaa.com" from the localhost line in /etc/hosts altogether. Normally 127.0.0.1 is localhost (or localhost.localdomain), nothing else. |
Again thanks for your reply.
i've tried putting mail.aaa.com ahead of localhost.localdomain and it doesn not help at all. i've found out that if i send mail within the terminal (at the mail server) #echo "Hello" | mail john then when i check the mail (as user1) i will get john@linuxforum.com which is what i want. but then, when i use webmail as user1 sending mail to john (squirrelmail). then the john@localhost.linuxforum.com will appear. what is it going on? Please help.. Thanks rgds. Lim |
Hi going on to the next steps.
i have installed dovecot so that client can retrive and send mail. but the problem is i could receive mail from the server but not sending. what likely is wrong with it? Thanks for ur attention rgds. Lim |
Receiving mail from a mail server uses POP3 or IMAP protocol most likely.
Sending mail out is done via SMTP. As SMTP uses a different port as the other protocols, the first suspect would be that the SMTP port (number 25) is blocked. So, check the firewall on your host and on the mail server and see if they allow access to port 25 on the server. You can also verify that access is allowed/blocked by executing: Code:
telnet your_mail_server 25 |
Hi again,
I've got the localhost@mydomain.com solved. just have to change the localhost at squirrelmail config.php i've tried the telnet to the machine at port 25 no response. also #iptables -L shown accept all type of incoming. in gui i've also disable the SELinux and Firewall at the very first time. something to set in postfix? in postfix i am using the default setting but added these home_mailbox = Maildir/ myhostname = mail.aaa.com myorigin = $mydomain mydomain = aaa.com in dovecot using the default and made changes on protocols = pop pop3s imap imaps what's the problem could be? Please advice. rgds. Lim |
I don't know anything about dovecot, but if it's supposed to retrieve mails for you, don't you need
smtp protocol as well? |
sorry if i'm repeating things that's already been said but your /etc/postfix/main.cf file shoudl look something like this:
Code:
myhostname = mail.aaa.com hope this helps you :) |
All times are GMT -5. The time now is 08:51 AM. |