Results 1 to 6 of 6

Thread: Mail - Error sending to remote recipient

  1. #1
    Join Date
    Jun 2008
    Location
    Dublin, Ireland
    Posts
    298

    Default Mail - Error sending to remote recipient

    Hi,

    I am trying to test an email server. I log into a remote host connect to the mail server using:

    Code:
     telnet ipaddress 25
    I get:
    Code:
    Trying ...
    Connected to 7.
    Escape character is '^]'.
    220 mail.myserver.com ESMTP Postfix
    Then I say hello:
    Code:
    EHLO mydomain.com
    It says:

    Code:
    EHLO remotedomain.com
    250-mail.mydomain.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
    I send a mail telling who it's from
    Code:
    MAIL FROM:<mail@domain.com>
    It responds:
    Code:
    250 Ok
    I say where it's going:
    Code:
    RCPT TO:<test@domain.com>
    Then I get an error:
    Code:
    Recipient address rejected: Relay access denied
    Any ideas greatly appreciated...

    .jlar

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Mail - Error sending to remote recipient

    If domain.com mail is not handled by the server you connected to, then obviously the server is not going to accept your RCPT TO. This is basic anti-spam relay configuration.

  3. #3
    Join Date
    Jun 2008
    Location
    Dublin, Ireland
    Posts
    298

    Default Re: Mail - Error sending to remote recipient

    Ok, I fixed this.. now I get an OK when I send it. Where did it go though? I don't see it when I type mail..

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Mail - Error sending to remote recipient

    Mail log files are your friends, nay, any log file is your friend.

  5. #5
    Join Date
    Jun 2008
    Location
    Dublin, Ireland
    Posts
    298

    Default Re: Mail - Error sending to remote recipient

    I looked in /var/log/mail. Nothing has been written to it since early October.

    I think I'm close now... I set up two accounts 'accounts' and 'postmaster'. I can send mail to accounts@mydomain.com from another host via telnet. It's not being delivered locally though. If I send mail locally using the 'mail' command from the 'postmaster' account to the 'accounts' account, they don't get it. Oddly, mail sent from postmaster to root works, root gets the mail...

  6. #6
    Join Date
    Jun 2008
    Location
    Dublin, Ireland
    Posts
    298

    Default Re: Mail - Error sending to remote recipient

    Hi,

    I figured out what was wrong here. I hope it is of use to someone else. You need to edit the file:

    /etc/aliases

    The handiest way is to have one account to receive all the mails, so that would look like:

    sales: tom
    orders: tom
    info: tom

    which means all sales@mydomain.com, orders@mydomain.com, info@mydomain.com will go to tom@mydomain.com. Now run the command:

    Code:
    postalias /etc/aliases
    The reason root was getting all the mail is because everything is sent to root if an alias can't be found for it.

    I found this solution in:
    Suse Linux by Chris Brown, published by O'Reilly

    An excellent book...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •