~ubuntu-branches/ubuntu/natty/amavisd-new/natty

« back to all changes in this revision

Viewing changes to README_FILES/README.sendmail

  • Committer: Bazaar Package Importer
  • Author(s): Christian Perrier
  • Date: 2007-02-24 19:27:53 UTC
  • mfrom: (3.1.7 feisty)
  • Revision ID: james.westby@ubuntu.com-20070224192753-fvvima53q1jrp34x
Tags: 1:2.4.2-6.1
* Non-maintainer upload to fix pending l10n issues.
* Debconf translations
  - Remove extra debian/po/de.po~
  - Convert all translation files to UTF-8
  - Russian. Closes: #405243
  - Spanish. Closes: #408734
  - Italian. Closes: #409831
* Add very simple LSB headers to init scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
  Note: I assume that sendmail.cf is in /etc - on your system it may be
68
68
in /etc/mail
69
69
 
70
 
  Setting it up in easy 5 steps (without the m4 way) 
 
70
  Setting it up in easy 5 steps (without the m4 way)
71
71
(please *read* the example configuration section below, too!):
72
72
 
73
73
Step 1: Copy your /etc/sendmail.cf file to /etc/sendmail.orig.cf
86
86
R<@>            $#local $: <@>          special case error msgs
87
87
R$*             $: $>98 $1              handle local hacks
88
88
R$*             $#amavis $:$1
89
 
#R$*            $: $>Parse1 $1          final parsing  
 
89
#R$*            $: $>Parse1 $1          final parsing
90
90
 
91
91
Be careful of tabs, so here's the code again, instead of [tab] press
92
92
the tab key :-)
95
95
R<@>[tab][tab]$#local $: <@>[tab][tab]special case error msgs
96
96
R$*[tab][tab]$: $>98 $1[tab][tab]handle local hacks
97
97
R$*[tab][tab]$#amavis $:$1
98
 
#R$*[tab][tab]$: $>Parse1 $1[tab][tab]final parsing  
 
98
#R$*[tab][tab]$: $>Parse1 $1[tab][tab]final parsing
99
99
 
100
100
Add the new mailer definition:
101
101
Mamavis,        P=/usr/sbin/amavis, F=nmlsACDFMS5:/|@qhP, S=0, R=0,
102
102
                T=DNS/RFC822/X-Unix, U=amavis:amavis,
103
103
                A=amavis $f $u
104
104
 
105
 
[Step 3, with older amavis: do a ./configure --enable-relay --enable-sendmail, 
 
105
[Step 3, with older amavis: do a ./configure --enable-relay --enable-sendmail,
106
106
 make and make install (you may add some more flags to configure)]
107
107
 
108
108
Step 3, with amavisd-new: change the settings of $forward_method and
121
121
  Setting it up in easy 7 steps - doing it the m4 way
122
122
  (please *read* the example configuration section below, too!)
123
123
 
124
 
Step 1: Copy your /etc/sendmail.cf file to /etc/sendmail.orig.cf 
 
124
Step 1: Copy your /etc/sendmail.cf file to /etc/sendmail.orig.cf
125
125
Step 2: Copy the provided doc/amavis.m4 file to /usr/share/sendmail/mailer
126
126
        (this is the location for a SuSE Linux system ... please have a
127
127
         look at your .mc file for the "include" macro. It tells you
128
128
         in which path your sendmail m4 stuff is located. Don't forget
129
 
         to put amavis.m4 into the mailer/ directory and not the m4/ dir) 
 
129
         to put amavis.m4 into the mailer/ directory and not the m4/ dir)
130
130
Step 3: Copy your .mc file, used for generating sendmail.cf, to amavis.mc
131
131
Step 4: Change amavis.mc
132
132
 
135
135
define(`STATUS_FILE',`/var/log/amavis.st')dnl
136
136
 
137
137
b) add the amavis mailer to the MAILER definitions
138
 
MAILER(`amavis')dnl    
 
138
MAILER(`amavis')dnl
139
139
 
140
140
[Step 5, with older amavis: do a ./configure --enable-relay --enable-sendmail,
141
141
 make and make install (you may add some more flags to configure) ]
149
149
/var/spool/mqueue but owner and group should be amavis
150
150
 
151
151
Step 7: Restart sendmail, i.e. killall -HUP sendmail or with SuSE Linux
152
 
rcsendmail restart 
 
152
rcsendmail restart
153
153
 
154
154
 
155
155
 
177
177
NOTE: If mail is deferred, it may get stuck in the queue (this may happen
178
178
if a delivery attemp fails). Calling
179
179
/usr/sbin/sendmail -C /etc/sendmail.orig.cf -q via cron is a good idea.
180
 
Another solution is to call 
 
180
Another solution is to call
181
181
/usr/sbin/sendmail -q5m -C /etc/mail/sendmail.orig.cf
182
182
In this example, the mail queue is flushed every 5 minutes.
183
183
 
186
186
--------------------------------------
187
187
 
188
188
Here's the configuration I use on my SuSE Linux system with sendmail 8.9.3
189
 
(for sendmail 8.11 see below). 
 
189
(for sendmail 8.11 see below).
190
190
AMaViS is run as user amavis, group amavis and therfore /var/spool/mqamavis
191
191
is owned by amavis:amavis
192
192
 
200
200
 
201
201
 
202
202
/etc/sendmail.orig.cf:
203
 
* to get rid off the X-Authentification-Warning "Processed by amavis 
204
 
with -C /etc/sendmail.orig" and "Processed from queue /var/spool/mqueue" 
 
203
* to get rid off the X-Authentification-Warning "Processed by amavis
 
204
with -C /etc/sendmail.orig" and "Processed from queue /var/spool/mqueue"
205
205
I removed authwarnings from PrivacyOptions, so
206
206
O PrivacyOptions=novrfy,noexpn
207
207
 
208
208
NOTE: The "goaway" option is another PrivacyOption. The "goaway" option
209
 
implies the "authwarnings" option, so with "goaway" you'll get the 
 
209
implies the "authwarnings" option, so with "goaway" you'll get the
210
210
X-Authentification-Warning.
211
211
 
212
212
 
220
220
NOTE: As sendmail will perform most tasks as user amavis now, it may
221
221
not be able to read the users .forward file anymore! You may consider
222
222
changing the permissions for the home directories, i.e. access rights
223
 
for others. 
 
223
for others.
224
224
 
225
225
 
226
226
EXAMPLE CONFIGURATION (sendmail 8.11)
227
227
--------------------------------------
228
228
 
229
 
Here's the configuration I use on my SuSE Linux system with sendmail 8.11. 
 
229
Here's the configuration I use on my SuSE Linux system with sendmail 8.11.
230
230
AMaViS is run as user amavis, group amavis.
231
231
 
232
232
/etc/mail/sendmail.cf:
248
248
 
249
249
 
250
250
/etc/sendmail.orig.cf:
251
 
* to get rid off the X-Authentification-Warning "Processed by amavis 
252
 
with -C /etc/sendmail.orig" and "Processed from queue /var/spool/mqueue" 
 
251
* to get rid off the X-Authentification-Warning "Processed by amavis
 
252
with -C /etc/sendmail.orig" and "Processed from queue /var/spool/mqueue"
253
253
I removed authwarnings from PrivacyOptions, so
254
254
O PrivacyOptions=novrfy,noexpn
255
255
 
256
256
NOTE: The "goaway" option is another PrivacyOption. The "goaway" option
257
 
implies the "authwarnings" option, so with "goaway" you'll get the 
 
257
implies the "authwarnings" option, so with "goaway" you'll get the
258
258
X-Authentification-Warning.
259
259
 
260
260
 
261
261
 
262
262
The Mlocal entry looks like this
263
 
Mlocal,    P=/usr/bin/procmail, F=lsDFMAw5:/|@qPfhn9, 
 
263
Mlocal,    P=/usr/bin/procmail, F=lsDFMAw5:/|@qPfhn9,
264
264
           S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
265
265
           T=DNS/RFC822/X-Unix,
266
266
           A=procmail -Y -a $h -d $u
287
287
* or (prefered)
288
288
change the delivery mode in /etc/mail/sendmail.orig.cf to
289
289
# default delivery mode
290
 
O DeliveryMode=i  
291
 
# i       Deliver interactively (synchronously)  
 
290
O DeliveryMode=i
 
291
# i       Deliver interactively (synchronously)
292
292
 
293
293
 
294
294
NOTE: as amavis is run as amavis /var/lib/amavis/virusmails must be owned
299
299
NOTE: As sendmail will perform most tasks as user amavis now, it may
300
300
not be able to read the users .forward file anymore! You may consider
301
301
changing the permissions for the home directories, i.e. access rights
302
 
for others. 
 
302
for others.
303
303
 
304
304
 
305
305
TODO/BUGS