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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-06-2006, 02:47 AM
|
#1
|
Member
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68
Rep:
|
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
|
|
|
04-06-2006, 03:00 AM
|
#2
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
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
man transport
may help you too.
|
|
|
04-06-2006, 04:55 AM
|
#3
|
Member
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68
Original Poster
Rep:
|
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~
|
|
|
04-06-2006, 09:07 AM
|
#4
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
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.
|
|
|
04-07-2006, 02:17 AM
|
#5
|
Member
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68
Original Poster
Rep:
|
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
|
|
|
04-07-2006, 02:21 AM
|
#6
|
Member
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68
Original Poster
Rep:
|
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
|
|
|
04-07-2006, 02:29 AM
|
#7
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
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
If that connects, then there is no firewall blocking port 25. If it doesn't, check the firewall configs and other security measures involved.
|
|
|
04-07-2006, 03:18 AM
|
#8
|
Member
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68
Original Poster
Rep:
|
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
|
|
|
04-07-2006, 06:32 AM
|
#9
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
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?
|
|
|
04-07-2006, 08:12 AM
|
#10
|
Member
Registered: Oct 2005
Distribution: Ubuntu 5.10
Posts: 50
Rep:
|
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
myorigin = /etc/mailname
mydestination = aaa.com, localhost.localdomain, localhost
mynetworks = 127.0.0.0/8
masquerade_domains = mail.aaa.net
masquerade_exceptions = root
the main thing you should watch out for is the masquerade_domains line - it's what prevents the "mail" part on "mail.aaa.com" from showing up after the @ everytime you send mail.
hope this helps you 
|
|
|
All times are GMT -5. The time now is 09:53 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|