Showing posts with label Email. Show all posts
Showing posts with label Email. Show all posts

Monday, December 16, 2013

Enable snmp on ironport


By default snmp is not enabled on ironport.
to enable it, ssh to the ironport server, then run this command:

snmpconfig


after configuring, run this command to save the config and make it active:

commit

Wednesday, March 27, 2013

Email domain remapping in sendmail


Sendmail can be configured to remap email domain (sender email) from one to another such as mapping from mail.com to mail2.com

File is: genericstable

Format is:

@mail.com     %1@mail2.com
 

rebuilt it to the correct db format using this command:

makemap hash genericstable.db < genericstable

You need to add the following 2 lines to the sendmail.mc file:

FEATURE(`genericstable')dnl
GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl

add the domain to generics-domains, format is:

mail.com

change the sendmail.mc to sendmail.cf using this command:

m4 sendmail.mc > sendmail.cf

Then restart sendmail.

In solaris, use this:

svcadm disable sendmail
svcadm enable sendmail

In Linux, use this

/etc/init.d/sendmail restart


Test email using sendmail command


Test email using sendmail command:

sendmail -vt -F"Sender Name" -f From_Email@mail.com To_Email@mail.com

(to include subject, type Subject: after running the command and the rest will be message. Press Ctrl+D when finish)



Simple Mail Command


Mail command to send email to 1 recipient is:

echo "email body" | mail -s "subject" ToEmail@example.com -- -r FromEmail@example.com

Mail command to send email to multiple recipients is:
echo "email body" | mail -s "subject" ToEmail@example.com,ToEmail2@example.com,ToEmail3@example.com -- -r FromEmail@example.com

You can also feed the email message using "<<<", which is useful for scripting:

mail -s "subject" ToEmail@example.com,ToEmail2@example.com,ToEmail3@example.com -- -r FromEmail@example.com <<< “mail body”

 You can attach a file using the uuencode command. Make sure you put the file name twice:

uuencode test.txt test.txt | mail -s "subject" ToEmail@example.com,ToEmail2@example.com,ToEmail3@example.com -- -r FromEmail@example.com <<< “mail body”