gregs

sendmail

Setting up email forwarding

by gregs on Oct.18, 2000, under *nix, email, sendmail

In this document I will show you two methods of configuring e-mail forwarding on a Linux mail server. You will need to have superuser access rights or login as root. Secondly you will need to know how to use the Vi editor (see Basic Vi editing for an introduction). Also in the examples don’t type the information in brackets, unless othewise specified, as it’s only their for comment purposes.So let’s get cracking.

Using .forward

In the first method we will create a file in the users home directory. So change to the user’s directory (in our example it will be jsmith [Or our trusty John Smith user]). There you will have to create a file called .forward using vi. In the file you will enter the e-mail address where all the messages are to be forwarded to. Follow the example below and substitute jsmith for your user’s name.

cd /home/jsmith

vi .forward

(enter the e-mail address to which all incomming messages are to be forwarded)

jsmith@otherdomain.com

(save and quit the file)

You have now configured all of John Smith’s e-mails to be sent to jsmith@anotherdomain.com

Using the aliases file

The second method is to use the aliases file. So just open the file in your Vi editor and create a new category at the end of the file called forwarding. There you will enter the username and point to the new address. The example below should help clarify this:

vi /etc/aliases

(scroll to the end of the file and insert the following statements)

# Forwarding

jsmith: jsmith@anotherdomain.com

(save and quit the aliases file and enter the following command)

sendmail -bi

This method allows for better centralised control, as all the information is stored in one place and therefore easier to maintain. Again I hope you found this tidbit of information useful.

Leave a Comment more...

How to limit mail attachment size for Sendmail

by gregs on Oct.18, 2000, under *nix, email, sendmail

How to limit mail attachment size for Sendmail

This little document is going to briefly show how to limit the size of incoming mail attachments. In order to this you are going to have to be familiar with Vi editing (see Basic Vi editing for an introduction).

First off telnet on to your mail server and log on as root or su. Next change to /etc directory. In that directory you should find a file called sendmail.cf (if you can’t find it, try typing whereis sendmail.cf, this should return a list of files with the word sendmail in it and hence you should be able to locate it that way). Prior to editing it, make a backup copy of it. Now you can type vi sendmail.cf.

Now scroll down this file until you find an entry that looks something like this:
# maximum message size
# 0 MaxMessageSize=1000000
In order to limit the size of messages simply uncomment the last line so that it reads:
0 MaxMessageSize=1000000
Furthermore you can specify the maximum message size by editing the value bit. Once done, save the changes and exit.

The final step involves stopping and restarting the server so that the changes can take effect (check your /etc/rc.d/init.d/ directory).

4 Comments more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!