PDA

View Full Version : Problem with mail server


vsharma
7th February 2007, 00:37
Hi,

I followed the "Perfect setup fedora 5" guide and installed postfix. but I am getting errors in rec. emails. below are the details:

Out put of SMTP-AUTH and TLS is below:

[root@jsh sasl2]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 jsh.example.com ESMTP Postfix
ehlo localhost
250-jsh.example.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250 8BITMIME

Auth error I see in the log file is:

Feb 6 16:51:17 jsh postfix/smtpd[2549]: connect from shawidc-mo1.cg.shawcable.net[24.71.223.10]
Feb 6 16:51:17 jsh postfix/smtpd[2549]: NOQUEUE: reject: RCPT from shawidc-mo1.cg.shawcable.net[24.71.223.10]: 554 <web1_admin@example.com>: Relay access denied; from=<xxx@shaw.ca> to=<web1_admin@example.com> proto=ESMTP helo=<pd5mo3so.prod.shaw.ca>

Can anyone please point me in the correct direction as what I am doing wrong? and how to fix it!!

Thanks a bunch in advance!!

Jorem
7th February 2007, 01:28
Relay access denied; from=<xxx@shaw.ca> to=<web1_admin@example.com>

You try to send a email to web1_admin@example.com from xxx@shaw.ca. Is shaw.ca also a domain on the server?

If not that is why you get the error Relay access denied. You can only send mail with an account that is on the server itself.

vsharma
7th February 2007, 02:01
No aa@shaw.ca is not a domain on the server.

Basically, I setup an email server with static IP and DNS is resolving fine.

so if I send an email from any email account for that matter lets say gmail, it should come to my server correct?

And based on the logs, seems like the email is getting routed to my server but getting rejected by my mail server.

Am I missing something?

Jorem
7th February 2007, 02:21
Maybe you can check your mailserver with the tools on dnsstuff.com.

You can check an email address and see what is wrong with it. If you can post the errors here so I can have a look. Maybe I can help you more than.

vsharma
7th February 2007, 02:27
Feb 6 19:20:35 jsh postfix/smtpd[6728]: connect from gam14-1-82-67-96-246.fbx.proxad.net[82.67.96.246]
Feb 6 19:20:41 jsh postfix/smtpd[6728]: lost connection after CONNECT from gam14-1-82-67-96-246.fbx.proxad.net[82.67.96.246]
Feb 6 19:20:41 jsh postfix/smtpd[6728]: disconnect from gam14-1-82-67-96-246.fbx.proxad.net[82.67.96.246]
Feb 6 19:24:01 jsh postfix/anvil[6730]: statistics: max connection rate 1/60s for (smtp:82.67.96.246) at Feb 6 19:20:35
Feb 6 19:24:01 jsh postfix/anvil[6730]: statistics: max connection count 1 for (smtp:82.67.96.246) at Feb 6 19:20:35
Feb 6 19:24:01 jsh postfix/anvil[6730]: statistics: max cache size 1 at Feb 6 19:20:35
Feb 6 19:24:46 jsh postfix/smtpd[6880]: connect from f2.b1.5646.static.theplanet.com[70.86.177.242]
Feb 6 19:24:46 jsh postfix/smtpd[6880]: NOQUEUE: reject: RCPT from f2.b1.5646.static.theplanet.com[70.86.177.242]: 554 <admin@mastilounge.com>: Relay access denied; from=<TestedFrom-65.186.205.253@DNSreport.com> to=<admin@mastilounge.com> proto=SMTP helo=<test.DNSreport.com>
Feb 6 19:24:46 jsh postfix/smtpd[6880]: lost connection after RCPT from f2.b1.5646.static.theplanet.com[70.86.177.242]
Feb 6 19:24:46 jsh postfix/smtpd[6880]: disconnect from f2.b1.5646.static.theplanet.com[70.86.177.242]

Jorem
7th February 2007, 10:41
- http://www.dnsstuff.com/tools/dnsreport.ch?domain=mastilounge.com

I get an error that one of the nameservers did not respond.

- http://www.dnsstuff.com/tools/mail.ch?domain=admin@mastilounge.com

Step 1: Try connecting to the following mailserver:
mastilounge.com. - 66.36.231.241

Trying to connect to all mailservers:

mastilounge.com. - 66.36.231.241 [Could not connect: Got an unknown RCPT TO response: 554 <admin@mastilounge.com>: Relay access denied

Can you post your Postfix main.cf config file. I think you maybe have a wrong setting there.

vsharma
7th February 2007, 16:27
queue_directory = /var/spool/postfix

command_directory = /usr/sbin

daemon_directory = /usr/libexec/postfix

mail_owner = postfix

inet_interfaces = all

mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

debug_peer_level = 2

debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/sbin/sendmail.postfix

newaliases_path = /usr/bin/newaliases.postfix

mailq_path = /usr/bin/mailq.postfix

setgid_group = postdrop

html_directory = no

manpage_directory = /usr/share/man

sample_directory = /usr/share/doc/postfix-2.2.8/samples

readme_directory = /usr/share/doc/postfix-2.2.8/README_FILES
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,rejec
t_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

falko
7th February 2007, 20:18
Auth error I see in the log file is:

Feb 6 16:51:17 jsh postfix/smtpd[2549]: connect from shawidc-mo1.cg.shawcable.net[24.71.223.10]
Feb 6 16:51:17 jsh postfix/smtpd[2549]: NOQUEUE: reject: RCPT from shawidc-mo1.cg.shawcable.net[24.71.223.10]: 554 <web1_admin@example.com>: Relay access denied; from=<xxx@shaw.ca> to=<web1_admin@example.com> proto=ESMTP helo=<pd5mo3so.prod.shaw.ca>

Can anyone please point me in the correct direction as what I am doing wrong? and how to fix it!!

Thanks a bunch in advance!!
You must enable "Server requires authentication." in your email client.

vsharma
7th February 2007, 20:37
Hi falko,

Not sure what you mean by "You must enable "Server requires authentication." in your email client."

The error I am getting is on the server side and am not to the point yet to view recieved emails through a email client.

This error comes when some one sends an email to the email address on my mail server. Sending client may be any, I tried sending from gmail as well.

wapa17
8th February 2007, 03:04
Hi vsharma,

try to send an e-mail from your mailadress to another mailadress of your domain.
example: admin@yourdomain.com ---> support@yourdomain.com

and see if "support@yourdomain.com" receive the mail.

falko
8th February 2007, 21:06
This error comes when some one sends an email to the email address on my mail server. Sending client may be any, I tried sending from gmail as well.
Then make sure that the receiving domain is listed in mydestination in /etc/postfix/main.cf.
This thread might help you as well: http://www.howtoforge.com/forums/showthread.php?t=2

vsharma
10th April 2007, 02:42
I have setup postfix with virtual domain and accounts, but the incoming email to a virtual account is going to root Unix user. Does any onw know what could be wrong?

message in maillog:
Apr 9 18:56:44 jsh postfix/local[18962]: 8CE4DD09810: to=<root@mastilounge.com>, orig_to=<support@mastilounge.com>, relay=local, delay=0, status=sent (delivered to maildir)

Also, I am seeing some warnings in maillog:
Apr 9 18:56:44 jsh postfix/trivial-rewrite[18960]: warning: do not list domain mastilounge.com in BOTH mydestination and virtual_mailbox_domains
Apr 9 18:56:44 jsh postfix/local[18962]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Apr 9 18:56:44 jsh postfix/trivial-rewrite[18960]: warning: do not list domain mastilounge.com in BOTH mydestination and virtual_mailbox_domains
Apr 9 18:56:44 jsh postfix/trivial-rewrite[18960]: warning: do not list domain mastilounge.com in BOTH mydestination and virtual_mailbox_domains

Below are some configurations parameters from main.cf:
#virtual_alias_domains = mastilounge.com
#virtual_alias_maps = hash:/etc/postfix/virtual

virtual_mailbox_domains = /etc/postfix/vhosts.txt
virtual_mailbox_base = /var/spool/vmail
virtual_mailbox_maps = hash:/etc/postfix/vmaps.txt
virtual_uid_maps = static:10011
virtual_gid_maps = static:10002
virtual_alias_maps = hash:/etc/postfix/valias.txt



Any help will be greatly appriciated

falko
10th April 2007, 17:18
If you use mastilounge.com for virtual mail accounts, you must not list that domain in mydestination in /etc/postfix/main.cf. Please remove it from mydestination and restart Postfix.