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


eeijlar

eeijlar’s Profile: http://forums.opensuse.org/member.php?userid=1504
View this thread: http://forums.opensuse.org/showthread.php?t=400598

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.


ken_yap

ken_yap’s Profile: http://forums.opensuse.org/member.php?userid=221
View this thread: http://forums.opensuse.org/showthread.php?t=400598

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…


eeijlar

eeijlar’s Profile: http://forums.opensuse.org/member.php?userid=1504
View this thread: http://forums.opensuse.org/showthread.php?t=400598

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


ken_yap

ken_yap’s Profile: http://forums.opensuse.org/member.php?userid=221
View this thread: http://forums.opensuse.org/showthread.php?t=400598

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…


eeijlar

eeijlar’s Profile: http://forums.opensuse.org/member.php?userid=1504
View this thread: http://forums.opensuse.org/showthread.php?t=400598

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…


eeijlar

eeijlar’s Profile: http://forums.opensuse.org/member.php?userid=1504
View this thread: http://forums.opensuse.org/showthread.php?t=400598