Tag Info

New answers tagged

1

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


0

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


1

"Here document" in shell scripts (You compose message headers and body) #!/bin/sh TO=email@example.com /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 TO=email@example.com BODY_FILE=mail.txt (cat - $BODY_FILE)<<HEADERS_END | /usr/sbin/sendmail -i ...


4

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 email@example.com 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 ...


3

With most mailers you can do something like this in the /etc/aliases file. joe: joe, someaddress@someotherdomain.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