Not able to send mail.
I m not able to configure sntp server at my linux distribution.
Here are the details. Defined the mail server here. Code:
/etc/mail/sendmail.mc Code:
m4 /etc/mail/sendmail.mc /etc/mail/sendmail.cf tried sending mail using . Code:
mail -v -s "test" username@domain.com < /tmp/abc M i missing something? However i get the mails When i use telnet to send the mail. . Here is what i m doing. telnet to the mailserver on port 25 it get connected . Code:
ehlo domain.com |
Hi,
You should check the logs in /var/log/maillog to see what happens. Also read the DSN on the returned mail Regards |
Quote:
Code:
Jul 21 16:32:39 HOSTNAME sendmail[16628]: p6LArBmh016628: to=root, ctladdr=root (0/0), delay=00:09:28, xdelay=00:00:00, mailer=relay, pri=30738, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p6LB2dWR017196 Message accepted for delivery) |
The chunk of maillog you've posted shows no error, that's why you get a dsn=2.0.0. Besides it's local mail. The smarthost is used when you need to send an email to an external domain.
So, you should send an external email, watch the logs and read the returned mail headers (that is what i meant by DSN), or post 'em here. Regards |
Quote:
Quote:
We have organizational setup and using a single mail server for all machines in the organization. Does it categorized into local mail(I mean for internal users only) Noob here? Posting here complete output after i run following command. Code:
mail -s "test" username@domain.com < /tmp/abc Code:
Jul 22 09:12:08 HOSTNAME sendmail[10324]: p6M3g7vh010324: from=root, size=47, class=0, nrcpts=1, msgid=<201107220342.p6M3g7vh010324@HOSTNAME.domain.com>, relay=root@localhost |
Hi,
Local mail, is the mail to a local user, i.e. a user that exists on the same host running sendmail. And external is the mail to anyone else. You can check them by looking at the logs for the "mailer=..." Now regarding the "Data format error", I guess the smarthost does not like your hostname (localhost.localdomain). Edit /etc/hosts and add your FQDN there Regards |
Quote:
One wild guess .Can switching from sendmail to postfix make it a better choice? |
Quote:
|
Quote:
In sendmail i used to fire command like. Code:
mail -s "SUBJECT" username@domain.com < filetobesent. |
|
I resolve the issue by changing relay server in /etc/mail/sendmail.cf file.
Now i can able to send mail. But i have to add one extra parameter to attach sender information . like -- -r sender@domain.com. Earlier the hostname was used as sender . Do you guys have any clue over this? I think there must have been some kind of hardening done on mail server (Wild guess :) ) |
All times are GMT -5. The time now is 03:38 AM. |