New answers tagged sendmail
Create directory with below command mkdir /var/spool/mqueue Make sure mqueue directory has correct permission chown root:mail /var/spool/mqueue Then restart Sendmail service sendmail restart
One of possible solution is that, create the mqueue drive with root permission in /var/spool hope its may work. best luck. Regards Jaymin D
"Here document" in shell scripts (You compose message headers and body) #!/bin/sh TOfirstname.lastname@example.org /usr/sbin/sendmail -i $TO <<MAIL_END Subject: Hello To: $TO I would like to buy a hamburger MAIL_END Message body from external file #!/bin/sh TOemail@example.com BODY_FILE=mail.txt (cat - $BODY_FILE)<<HEADERS_END | /usr/sbin/sendmail -i ...
Your echo statement should really output newlines not the sequence \ followed by n. You can do that by providing the -e option: echo -e "Subject:Hello \n\n I would like to buy a hamburger\n" | sendmail firstname.lastname@example.org To understand what is the difference have a look at the output from the following two commands: echo "Subject:Hello \n\n I would like to ...
With most mailers you can do something like this in the /etc/aliases file. joe: joe, email@example.com After making changes to this file you typically have to run the command, newaliases. References How to redirect local root mail to an external email address on Linux Forwarding email and must keep a copy
Top 50 recent answers are included