LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 04-06-2006, 02:47 AM   #1
rickylim
Member
 
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68

Rep: Reputation: 15
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
 
Old 04-06-2006, 03:00 AM   #2
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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.
 
Old 04-06-2006, 04:55 AM   #3
rickylim
Member
 
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68

Original Poster
Rep: Reputation: 15
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~
 
Old 04-06-2006, 09:07 AM   #4
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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.
 
Old 04-07-2006, 02:17 AM   #5
rickylim
Member
 
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68

Original Poster
Rep: Reputation: 15
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
 
Old 04-07-2006, 02:21 AM   #6
rickylim
Member
 
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68

Original Poster
Rep: Reputation: 15
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
 
Old 04-07-2006, 02:29 AM   #7
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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.
 
Old 04-07-2006, 03:18 AM   #8
rickylim
Member
 
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68

Original Poster
Rep: Reputation: 15
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
 
Old 04-07-2006, 06:32 AM   #9
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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?
 
Old 04-07-2006, 08:12 AM   #10
trawler
Member
 
Registered: Oct 2005
Distribution: Ubuntu 5.10
Posts: 50

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware Mail Server advice needed please. Lintoon Slackware 12 09-09-2005 05:57 PM
problem receiving pop3 mail from postfix mail server GEN_Electric Linux - Software 2 02-14-2005 02:43 PM
Postfix mail server not accepting incoming mail from the external interface rexmundi Linux - Networking 7 12-22-2003 03:41 PM
Postfix relaying mail to internal mail server tradecraft1 Linux - Networking 2 10-28-2003 03:01 PM
can anyone help need a advice on mail server DemisK Linux - General 1 04-04-2002 02:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration