LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-18-2009, 06:48 AM   #1
vikki
Member
 
Registered: Jun 2009
Posts: 30

Rep: Reputation: 18
Postfix cant send mail in local or any outer domain


I configured a Postfix Server on RHEL 5

this is how my main.cf looks like

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
default_privs = nobody
header_checks = regexp:/etc/postfix/header_checks
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
local_recipient_maps = unixasswd.byname $alias_maps
luser_relay = admin+$local
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $mydomain, $myhostname, localhost.$mydomain
mydomain = domain.com
myhostname = mail.domain.com
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
recipient_delimiter = +
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unlisted_recipient, check_policy_service unixostgrey/socket
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = private/auth-client
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_CAfile = /etc/postfix/certs/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/certs/smtpd.crt
smtpd_tls_key_file = /etc/postfix/certs/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550

i have used dovecot and cyrus-sasl for smtp-auth to prevent open relay
i have also configured postgrey and Mail Scanner..

when i telnet to my server on port 25 output comes

Trying 127.0.0.1...
Connected to mail.domain.com (127.0.0.1).
Escape character is '^]'.
220 mail.domain.com ESMTP Postfix
ehlo mail.domain.com
250-mail.domain.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

and on pop3
Connected to mail.domain.com (127.0.0.1).
Escape character is '^]'.
+OK Dovecot ready.

now the problem is i am not able to recieve any mails.. i tried to send it within my domain also. but waste..
i am also adding logs, kindly guide me where i am wrong

Jul 18 22:38:16 mail dovecot: imap-login: Login: user=<parth>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Jul 18 22:38:16 mail dovecot: IMAP(parth): Disconnected: Logged out
Jul 18 22:38:29 mail dovecot: imap-login: Login: user=<parth>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Jul 18 22:38:29 mail postfix/pickup[20811]: 4F5234C6D98: uid=48 from=<parth@domain.com>
Jul 18 22:38:29 mail postfix/cleanup[23049]: 4F5234C6D98: hold: header Received: by mail.domain.com (Postfix, from userid 48)??id 4F5234C6D98; Sat, 18 Jul 2009 22:38:29 +0530 (IST) from local; from=<parth@domain.com>
Jul 18 22:38:29 mail dovecot: IMAP(parth): Disconnected: Logged out
Jul 18 22:38:29 mail dovecot: imap-login: Login: user=<parth>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
Jul 18 22:38:29 mail dovecot: IMAP(parth): Disconnected: Logged out
 
Old 07-18-2009, 09:28 AM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 82
Can you check that the output of
Code:
hostname
and
Code:
hostname -r
match the domain that you own? They must. And your DNS records with your registrar need to be uptodate before mail will function correctly. Your conf file looks fine, at a glance.
 
Old 07-18-2009, 03:08 PM   #3
vikki
Member
 
Registered: Jun 2009
Posts: 30

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by irishbitte View Post
Can you check that the output of
Code:
hostname
and
Code:
hostname -r
match the domain that you own? They must. And your DNS records with your registrar need to be uptodate before mail will function correctly. Your conf file looks fine, at a glance.
hostname comes with mail.domain.com

seems perfect..

and for a delivery in local domain.. there shudnt be any requirements for DNS... where as DNS is also working fine..

here is the output of postqueue -p if it helps

B3F444C6D66! 661 Thu Jul 16 17:45:18 vikram@domain.com
vikram@domain.com

0B3DD4C6D60! 728 Fri Jul 17 21:01:01 atolani@domain.com
atolani@domain.com

1E4964C6D81! 728 Sat Jul 18 11:01:01 atolani@domain.com
atolani@domain.com

061C24C6D79! 728 Sat Jul 18 04:01:01 atolani@domain.com
atolani@domain.com

4F5234C6D98! 663 Sat Jul 18 22:38:29 parth@domain.com
parth@domain.com

484184C6D95! 673 Sat Jul 18 22:17:58 parth@domain.com
parth@localhost.domain.com

BEDBF4C6D78! 728 Sat Jul 18 03:01:01 atolani@domain.com
atolani@domain.com

7FCED4C6D7C! 728 Sat Jul 18 06:01:01 atolani@domain.com
atolani@domain.com

466BD4C6D72! 747 Fri Jul 17 18:21:18 parth@domain.com
arpittolani@gmail.com

98BD64C6D58! 741 Sat Jul 18 21:49:10 parth@domain.com
parth@domain.com

DA34A4C6D7B! 16308 Sat Jul 18 04:02:03 atolani@domain.com
atolani@domain.com

662C44C6D99! 434 Sat Jul 18 22:27:27 atolani@domain.com
atolani@localhost.domain.com


P.S. my users are on LDAP and it is working fine.. i have binded LDAP with pam mechanism using authconfig.
 
Old 07-19-2009, 10:12 AM   #4
emetib
Member
 
Registered: Feb 2003
Posts: 482

Rep: Reputation: 33
looking over your config i noticed that you don't have a "mynetworks = ...."
i see the "mynetworks_style = host"

i would add "mynetworks = 127.0.0.0/8" and then restart and try.
one more thing that i would add is "relayhost = ", leave the trailing area blank. this makes it so that noone can relay through you. if you have your dovecot, authentication, set up properly then it will check for the user trying to log in and send their mail without complaint.

cheers
 
Old 07-22-2009, 03:40 PM   #5
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 82
Just checking again, have you setup DNS correctly for your domain?
 
  


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
local postfix server not able to send mails to other domain subramanyabs1984 Linux - Server 1 03-13-2009 05:27 AM
Postfix send mail for specific domain through vpn tomazN Linux - Server 0 09-22-2008 05:25 AM
Howto Send mail to another Domain via postfix? tshrinivasan Linux - Server 2 09-16-2007 03:47 AM
squid block the mail send to outer domain tariq07 Linux - Security 1 04-27-2007 07:09 AM
Postfix: Do not allow local users to send mail Termina Linux - Server 1 03-22-2007 05:15 PM


All times are GMT -5. The time now is 12:43 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration