How to check whether I can send mail from my Linux server?
up vote
1
down vote
favorite
When I tried using mail or mailx with -r -s -a and other options, I am not able to send mail. Is there anything I need to check before sending mail from Linux server?
When I tried to see help for mail and mailx, I found below message:
[root@ukwcrbmorctd01 test_ezradsx]# mail --help
mail: illegal option -- -
Usage: mail -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users
[root@ukwcrbmorctd01 test_ezradsx]# mailx --help
mailx: illegal option -- -
Usage: mailx -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users "
Does the server I use support mail or mailx?
This is the log file.
Oct 11 12:12:53 abcpostfix/smtp[31869]: connect to abci1012.abc.net[10.209.205.31]:25: Connection timed out
Oct 11 12:12:53 abc01postfix/smtp[31869]: 2FC2D38A9C: to=<s.radhakrishnan@abc.com>, relay=none, delay=969, delays=939/0.06/3
shell-script mailx mail-command
|
show 4 more comments
up vote
1
down vote
favorite
When I tried using mail or mailx with -r -s -a and other options, I am not able to send mail. Is there anything I need to check before sending mail from Linux server?
When I tried to see help for mail and mailx, I found below message:
[root@ukwcrbmorctd01 test_ezradsx]# mail --help
mail: illegal option -- -
Usage: mail -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users
[root@ukwcrbmorctd01 test_ezradsx]# mailx --help
mailx: illegal option -- -
Usage: mailx -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users "
Does the server I use support mail or mailx?
This is the log file.
Oct 11 12:12:53 abcpostfix/smtp[31869]: connect to abci1012.abc.net[10.209.205.31]:25: Connection timed out
Oct 11 12:12:53 abc01postfix/smtp[31869]: 2FC2D38A9C: to=<s.radhakrishnan@abc.com>, relay=none, delay=969, delays=939/0.06/3
shell-script mailx mail-command
1
What command do you use to send emails?
– Egor Vasilyev
Oct 11 '17 at 10:24
2
You will need to use something along the lines of echo "This is a test" | mailx -r "mrsender" -s "test" -a "testattachment.txt" somebody@somewhere.com
– Raman Sailopal
Oct 11 '17 at 10:30
echo "Message_body" | mailx -s "test" s.radhakrishnan@abc.com and tried this command too. echo "Message_body" | mailx -r "d.dinesh@abc.com" -s "test" s.radhakrishnan@abc.com
– Radhakrishnan Rk
Oct 11 '17 at 10:58
1
Do you check log files? See/var/log/mail.log
– Egor Vasilyev
Oct 11 '17 at 11:02
1
Does iptables enabled on your server? Can you append your question with log file data?
– Egor Vasilyev
Oct 11 '17 at 11:26
|
show 4 more comments
up vote
1
down vote
favorite
up vote
1
down vote
favorite
When I tried using mail or mailx with -r -s -a and other options, I am not able to send mail. Is there anything I need to check before sending mail from Linux server?
When I tried to see help for mail and mailx, I found below message:
[root@ukwcrbmorctd01 test_ezradsx]# mail --help
mail: illegal option -- -
Usage: mail -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users
[root@ukwcrbmorctd01 test_ezradsx]# mailx --help
mailx: illegal option -- -
Usage: mailx -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users "
Does the server I use support mail or mailx?
This is the log file.
Oct 11 12:12:53 abcpostfix/smtp[31869]: connect to abci1012.abc.net[10.209.205.31]:25: Connection timed out
Oct 11 12:12:53 abc01postfix/smtp[31869]: 2FC2D38A9C: to=<s.radhakrishnan@abc.com>, relay=none, delay=969, delays=939/0.06/3
shell-script mailx mail-command
When I tried using mail or mailx with -r -s -a and other options, I am not able to send mail. Is there anything I need to check before sending mail from Linux server?
When I tried to see help for mail and mailx, I found below message:
[root@ukwcrbmorctd01 test_ezradsx]# mail --help
mail: illegal option -- -
Usage: mail -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users
[root@ukwcrbmorctd01 test_ezradsx]# mailx --help
mailx: illegal option -- -
Usage: mailx -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users "
Does the server I use support mail or mailx?
This is the log file.
Oct 11 12:12:53 abcpostfix/smtp[31869]: connect to abci1012.abc.net[10.209.205.31]:25: Connection timed out
Oct 11 12:12:53 abc01postfix/smtp[31869]: 2FC2D38A9C: to=<s.radhakrishnan@abc.com>, relay=none, delay=969, delays=939/0.06/3
shell-script mailx mail-command
shell-script mailx mail-command
edited Nov 21 at 21:04
Rui F Ribeiro
38.2k1475125
38.2k1475125
asked Oct 11 '17 at 9:58
Radhakrishnan Rk
476
476
1
What command do you use to send emails?
– Egor Vasilyev
Oct 11 '17 at 10:24
2
You will need to use something along the lines of echo "This is a test" | mailx -r "mrsender" -s "test" -a "testattachment.txt" somebody@somewhere.com
– Raman Sailopal
Oct 11 '17 at 10:30
echo "Message_body" | mailx -s "test" s.radhakrishnan@abc.com and tried this command too. echo "Message_body" | mailx -r "d.dinesh@abc.com" -s "test" s.radhakrishnan@abc.com
– Radhakrishnan Rk
Oct 11 '17 at 10:58
1
Do you check log files? See/var/log/mail.log
– Egor Vasilyev
Oct 11 '17 at 11:02
1
Does iptables enabled on your server? Can you append your question with log file data?
– Egor Vasilyev
Oct 11 '17 at 11:26
|
show 4 more comments
1
What command do you use to send emails?
– Egor Vasilyev
Oct 11 '17 at 10:24
2
You will need to use something along the lines of echo "This is a test" | mailx -r "mrsender" -s "test" -a "testattachment.txt" somebody@somewhere.com
– Raman Sailopal
Oct 11 '17 at 10:30
echo "Message_body" | mailx -s "test" s.radhakrishnan@abc.com and tried this command too. echo "Message_body" | mailx -r "d.dinesh@abc.com" -s "test" s.radhakrishnan@abc.com
– Radhakrishnan Rk
Oct 11 '17 at 10:58
1
Do you check log files? See/var/log/mail.log
– Egor Vasilyev
Oct 11 '17 at 11:02
1
Does iptables enabled on your server? Can you append your question with log file data?
– Egor Vasilyev
Oct 11 '17 at 11:26
1
1
What command do you use to send emails?
– Egor Vasilyev
Oct 11 '17 at 10:24
What command do you use to send emails?
– Egor Vasilyev
Oct 11 '17 at 10:24
2
2
You will need to use something along the lines of echo "This is a test" | mailx -r "mrsender" -s "test" -a "testattachment.txt" somebody@somewhere.com
– Raman Sailopal
Oct 11 '17 at 10:30
You will need to use something along the lines of echo "This is a test" | mailx -r "mrsender" -s "test" -a "testattachment.txt" somebody@somewhere.com
– Raman Sailopal
Oct 11 '17 at 10:30
echo "Message_body" | mailx -s "test" s.radhakrishnan@abc.com and tried this command too. echo "Message_body" | mailx -r "d.dinesh@abc.com" -s "test" s.radhakrishnan@abc.com
– Radhakrishnan Rk
Oct 11 '17 at 10:58
echo "Message_body" | mailx -s "test" s.radhakrishnan@abc.com and tried this command too. echo "Message_body" | mailx -r "d.dinesh@abc.com" -s "test" s.radhakrishnan@abc.com
– Radhakrishnan Rk
Oct 11 '17 at 10:58
1
1
Do you check log files? See
/var/log/mail.log
– Egor Vasilyev
Oct 11 '17 at 11:02
Do you check log files? See
/var/log/mail.log
– Egor Vasilyev
Oct 11 '17 at 11:02
1
1
Does iptables enabled on your server? Can you append your question with log file data?
– Egor Vasilyev
Oct 11 '17 at 11:26
Does iptables enabled on your server? Can you append your question with log file data?
– Egor Vasilyev
Oct 11 '17 at 11:26
|
show 4 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f397414%2fhow-to-check-whether-i-can-send-mail-from-my-linux-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
What command do you use to send emails?
– Egor Vasilyev
Oct 11 '17 at 10:24
2
You will need to use something along the lines of echo "This is a test" | mailx -r "mrsender" -s "test" -a "testattachment.txt" somebody@somewhere.com
– Raman Sailopal
Oct 11 '17 at 10:30
echo "Message_body" | mailx -s "test" s.radhakrishnan@abc.com and tried this command too. echo "Message_body" | mailx -r "d.dinesh@abc.com" -s "test" s.radhakrishnan@abc.com
– Radhakrishnan Rk
Oct 11 '17 at 10:58
1
Do you check log files? See
/var/log/mail.log
– Egor Vasilyev
Oct 11 '17 at 11:02
1
Does iptables enabled on your server? Can you append your question with log file data?
– Egor Vasilyev
Oct 11 '17 at 11:26