Problem with mail server

Discussion in 'Server Operation' started by vsharma, Feb 6, 2007.

  1. vsharma

    vsharma New Member

    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 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> 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!!
     
  2. Jorem

    Jorem Member

  3. vsharma

    vsharma New Member

    No [email protected] 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?
     
  4. Jorem

    Jorem Member

    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.
     
  5. vsharma

    vsharma New Member

    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 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> 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]
     
  6. Jorem

    Jorem Member

    - 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/[email protected]

    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 <[email protected]>: Relay access denied

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

    vsharma New Member

    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
     
  8. falko

    falko Super Moderator Howtoforge Staff

    You must enable "Server requires authentication." in your email client.
     
  9. vsharma

    vsharma New Member

    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.
     
  10. wapa17

    wapa17 New Member

  11. falko

    falko Super Moderator Howtoforge Staff

    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
     
  12. vsharma

    vsharma New Member

    Problem with postfix virtual account setup

    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=<[email protected]>, orig_to=<[email protected]>, 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
     
  13. falko

    falko Super Moderator Howtoforge Staff

    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.
     

Share This Page