Sendmail podešavanja, mail server srednje veličine, deo 1

Dakle, dole navedena podešavanja su takva da se INBOX nalazi u /var/spool/mail, dok se ostale stavke (trash, sent items..) nalaze u /home/username folderu.

Ovo je /etc/mail/sendmail.mc fajl :

divert(-1)dnl
*****
include(`/usr/share/sendmail-cf/m4/cf.m4′)dnl
VERSIONID(`setup for linux’)dnl
OSTYPE(`linux’)dnl
*****
define(`confDEF_USER_ID’, “8:12”)dnl
dnl define(`confAUTO_REBUILD’)dnl
define(`confTO_CONNECT’, `1m’)dnl
define(`confTRY_NULL_MX_LIST’, `True’)dnl
define(`confDONT_PROBE_INTERFACES’, `True’)dnl
define(`PROCMAIL_MAILER_PATH’, `/usr/bin/procmail’)dnl
define(`ALIAS_FILE’, `/etc/aliases’)dnl
define(`STATUS_FILE’, `/var/log/mail/statistics’)dnl
define(`UUCP_MAILER_MAX’, `2000000′)dnl
define(`confUSERDB_SPEC’, `/etc/mail/userdb.db’)dnl
define(`confPRIVACY_FLAGS’, `authwarnings,novrfy,noexpn,restrictqrun’)dnl
define(`confAUTH_OPTIONS’, `A’)dnl
*****
define(`confAUTH_MECHANISMS’, `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN’)dnl
*****
define(`confTO_QUEUEWARN’, `4h’)dnl
define(`confTO_QUEUERETURN’, `5d’)dnl
define(`confQUEUE_LA’, `12′)dnl
define(`confREFUSE_LA’, `18′)dnl
define(`confTO_IDENT’, `0′)dnl
FEATURE(delay_checks)dnl
FEATURE(`no_default_msa’, `dnl’)dnl
FEATURE(`smrsh’, `/usr/sbin/smrsh’)dnl
FEATURE(`mailertable’, `hash -o /etc/mail/mailertable.db’)dnl
FEATURE(`virtusertable’, `hash -o /etc/mail/virtusertable.db’)dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
*****
FEATURE(local_procmail, `’, `procmail -t -Y -a $h -d $u’)dnl
FEATURE(`access_db’, `hash -T -o /etc/mail/access.db’)dnl
FEATURE(`blacklist_recipients’)dnl
EXPOSED_USER(`root’)dnl
*****
MAILER(smtp)dnl
MAILER(procmail)dnl

U suštini se u fajl niša ne dodaje, samo se zacrnjene stavke “odhešuju” a hešujuju se linije :
dnl #DAEMON_OPTIONS(‘Port=smtp,Addr=127.0.0.1…..
dnl #FEATURE(‘accept_unresolvable_domains…..

Od njega se pravi cf fajl sa komandom #/etc/mail/make

Pošto je ovo Fedora 16 (a ne RHEL4 na koj sam inače navikla), paziti na sledeću stvar :
# usermod -a -G mail user1
# id user1
uid=1000(user1) gid=1000(user1) groups=1000(user1),12(mail)
Da bi mail radio kako treba, potrebno je da svaki nalog ima još i dodatnu grupu “mail”.

Testiranje
Da bi se moglo testirati po portu 25 (110 za sada nije podignut), potrebno je sledeće :
*Podešen DNS zapis
*Podešen fajl /etc/hosts :
127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4 .localdomain4 localhost mail-2014
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 localhost mail-2014
10.10.10.35 mail-2014.moj.domen mail-2014
*Podešen fajl /etc/mail/local-host-names :
# local-host-names – include all aliases for your machine here.
liste.moj.domen
mail-2014.moj.domen
mail-2014
*Podešen fajl /etc/mail/access+access.db :
Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
10 RELAY
liste.moj.domen OK
Kreirati access.db tabelu koju sendmail čita :
#makemap hash access < access *Restart mašine.

Testiranje se vrši slanjem mail poruke iz komandne linije.

This entry was posted in Linux and tagged . Bookmark the permalink.

Comments are closed.