@Mail System Documentation : v 3.4
The latest version of this file can be found at:
http://atmail.nl/docs/


@Mail Sendmail Configuration

1 Introduction: What is Sendmail

2 Configuring Sendmail for @Mail
    2.1 Including files
    2.2 Adding the rule
    2.3 Adding the @Mail Mailer
    2.4 Configuring Domains
    2.5 Restarting and testing

3 How @Mail receives eMail

4 Contact Information


1 Introduction: What is Sendmail?

Sendmail is an SMTP (Simple Mail Transfer Protocol) Server for UNIX. This is the program that moves the email from user to user.

2 Configuring Sendmail for @Mail

This method of email delivery requires direct modification to the sendmail.cf file. Make sure that you backup any existing configurations. The sendmail configuration can be rather difficult to understand. This document will simplify the understanding on how to configure Sendmail for @Mail.

First open sendmail.cf in a text-editor that does not remove existing formatting. (e.g vi , pico , ee via the terminal)

Step 1:

Find the line:
Fw/etc/mail/local-host-names

You will see similar to:

##################
# local info #
##################

Cwlocalhost
# file containing names of hosts for which we receive email
Fw/etc/mail/local-host-names

Under this line, add the following:

Fa/path/to/atmail/atmail-domains

Where /path/to/atmail/ is the directory of @Mail on your webserver. This adds a file with the @Mail Domain Names listed.

Step 2:

Find :
SParse1

You will see similar to:

#
# Parse1 -- the bottom half of ruleset 0.
#

SParse1

Just below the SParse1, define the @Mail mailer definition (above the others):

R$+ < @ $* $=a $+ > $*[tab]$#atmail $@$3 $:$1

Replace [tab] with a TAB to divide the end of '$*' and '$=atmail'
It is essential that this is a Tab and not a space

This matches for an email address e.g

username@atmail.nl

The $#atmail line, tells Sendmail to deliver the message using the atmail mailer definition.

The $@$3 , contains the hostname of the email address ($3, the third regular expression matched)

$:$1 contains the username.

Step 3

Find :
'MAILER DEFINITIONS'

You will see similar to:

########################################################
########################################################
#####
##### MAILER DEFINITIONS
#####
#######################################################
#######################################################

Towards the end of the sendmail.cf file.

Add the atmail mailer definition

Matmail, P=/www/atmail3/saveemail.pl, F=SDFMlqPhn9, S=0, R=0, T=X-Unix, U=nobody, A=saveemail.pl $u@$h

Replace P=/www/atmail3/saveemail.pl with your full pathname of @Mail installed.

Replace U=nobody with the user of your webserver (who has permissions over the @mail directory/userdir)

The line A=saveemail.pl $u@$h , runs the @Mail email delivery utility. The full address of the recipient is included as the first argument.

($u is defined from the $:$1 line above ; $h as $@$3)

Step 4:

Include the domains @Mail will use in

/etc/mail/local-host-names (system wide)

And

/path/to/atmail/atmail-domains (specific domains for @Mail)

Also, use the WebAdmin for @Mail, and include the domain-name you want to configure @Mail for.

Step 5:

Restart Sendmail

killall -9 sendmail
/usr/sbin/sendmail -bd -q30m

To test if Sendmail is delivering emails to @Mail:

/usr/sbin/sendmail -v "user@domain.com"

Hello

^D (control D)

-

You should receive a successful response

'ben@atmail.nl... Connecting to atmail.nl via atmail...'

Step 6:

If starting up sendmail fails and results in an error like: ... Group Writable Directory... edit your sendmail configuration and search for the option

O DontBlameSendmail

And set this to

O DontBlameSendmail=GroupWritableDirPathSafe

Doing this will cause sendmail to ignore the permissions of your local-host-names and atmail-domains when starting up. Repeat Step 5 to Restart Sendmail.

If external connections to the SMTP server are refused, most likely the Sendmail.cf is configured to only accept connections from the local-host. Some new Linux distributions set this by default for maximum security. To enable Sendmail to accept connections from external hosts, delete the following in the sendmail.cf and restart.

O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA

3 How @Mail receives emails

By configuring the Sendmail.cf with a new rule, all emails to the destination hostname are sent to the @Mail saveemail.pl script for delivery.

The saveemail.pl script receives the recipient of the email via the command line , the headers and body of the message are sent via STDIN.

4 Contact Support

For additional support, please visit our web site, http://webbasedemail.com
Or send us an eMail : support@CalaCode.com