как и обещал, выкладываю конфиги. ПРЕДУПРЕЖДАЮ, конфиги не полностью рабочие, в режиме отладки. О проблемах читайте в этом же форуме
# cat /etc/mail/sendmail.mc
include(`sendmail-cf/m4/cf.m4')
VERSIONID(`blah-blah-blah')dnl
OSTYPE(linux)dnl
undefine(`UUCP_RELAY')dnl
undefine(`BITNET_RELAY')dnl
define(`LUSER_RELAY',`local:felix')dnl
define(`confMAX_HEADERS_LENGTH',`16384')dnl
define(`confMAX_MIME_HEADER_LENGTH',`256/128')dnl
define(`confNO_RCPT_ACTION',`add-to-undisclosed')dnl
define(`confALIAS_WAIT', `10')dnl
define(`confTO_CONNECT', `15s')dnl
define(`confTO_QUEUEWARN', `5h')dnl
define(`confTO_QUEUERETURN', `4d')dnl
define(`confMAX_RCPTS_PER_MESSAGE', `10')dnl
define(`confMAX_MESSAGE_SIZE', `20000000')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`relay_based_on_MX')dnl
dnl virtusertable: redirect incoming mail to virtual domain to particular user or domain
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')dnl
dnl genericstable: rewrite sender address for outgoing mail
FEATURE(genericstable)dnl
FEATURE(redirect)dnl
dnl# Autentification
define(`confAUTH_OPTIONS', `A p y')dnl
define(`confAUTH_MECHANISMS', `LOGIN PLAIN DIGEST-MD5 CRAM-MD5 NTLM')dnl
TRUST_AUTH_MECH(`LOGIN PLAIN DIGEST-MD5 CRAM-MD5 NTLM')dnl
dnl# Masquerading
MASQUERADE_AS(`mydomain.ru')dnl
FEATURE(`limited_masquerade')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`allmasquerade')dnl
dnl# Antivirus filter
INPUT_MAIL_FILTER(`clmilter',`S=local:/var/run/clamav/clmilter.sock,F=, T=S:4m;R:4m')dnl
define(`confINPUT_MAIL_FILTERS', `clmilter')dnl
dnl# Spam filter
INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass-milter.sock, F=T, T=C:15m;S:4m;R:4m;E:10m')dnl
define(`confMILTER_MACROS_CONNECT',`b, j, _, {daemon_name}, {if_name}, {if_addr}')dnl
FEATURE(`no_default_msa')dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
DAEMON_OPTIONS(`Port=smtps, Name=MSA-SSL, M=E')dnl
dnl# SSL/TSL
nl# SSL/TSL
define(`confCACERT_PATH', `/etc/ssl/CA')dnl
define(`confCACERT', `/etc/ssl/CA/ca.crt')dnl
define(`confSERVER_CERT', `/etc/ssl/myserver.crt')dnl
define(`confSERVER_KEY', `/etc/ssl/myserver.key')dnl
dnl# DNSBL
FEATURE(`dnsbl',`list.dsbl.org')dnl
FEATURE(`dnsbl', `blackholes.mail-abuse.org', `Rejected - see http://www.mail-abuse.org/rbl/')dnl
FEATURE(`dnsbl', `dialups.mail-abuse.org', `Dialup - see http://www.mail-abuse.org/dul/')dnl
FEATURE(`dnsbl', `relays.mail-abuse.org', `Open spam relay - see http://www.mail-abuse.org/rss/')dnl
FEATURE(`dnsbl', `dul.ru', `Use mail relays of your ISP')dnl
FEATURE(`dnsbl',`dnsbl.void.ru',`Blocked by VOID.RU proxychecker')dnl
FEATURE(`dnsbl',`ex.dnsbl.org',`Spam blocked - see http://www.dnsbl.org/')dnl
dnl FEATURE(`dnsbl', `work.drbl.caravan.ru', `Use mail relays of your ISP')dnl
FEATURE(`dnsbl', `relays.ordb.org', `Spam bloked from open relay.')dnl
FEATURE(`delay_checks')dnl
FEATURE(`stickyhost')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
define(`confLOCAL_MAILER', `cyrusv2')
MAILER(`cyrusv2')
# cat /etc/imapd.conf
configdirectory: /var/mail/imap
#partition-default: /var/spool/imap
partition-default: /var/mail/spool/imap
sievedir: /var/mail/imap/sieve
tls_ca_path: /etc/ssl/certs
tls_cert_file: /etc/ssl/cyrus/server.pem
tls_key_file: /etc/ssl/cyrus/key.pem
# Don't use an everyday user as admin.
admins: cyrus
hashimapspool: yes
allowanonymouslogin: no
allowplaintext: yes
virtdomains: yes
defaultdomain: sun-nsk.ru
quotawarn: 90000000
singleinstancestore: yes
altnamespace: yes
sharedrefix: share
userprefix: privat
# Allow renaming of top-level mailboxes.
#allowusermoves: yes
# Use this if sieve-scripts could be in ~user/.sieve.
#sieveusehomedir: yes
# Use saslauthd if you want to use pam for imap.
# But be warned: login with DIGEST-MD5 or CRAM-MD5
# is not possible using pam.
#sasl_pwcheck_method: saslauthd
####################################################
## This is a recommended authentication method if you
## emerge cyrus-sasl with 'postgres' or 'mysql'
## To use with mysql database uncomment those lines below.
sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sasldb
sasldb_path: /etc/sasl2/sasldb2
#sasl_auxprop_plugin: sql
## possible values for sasl_auxprop_plugin 'mysql', 'pgsql', 'sqlite'.
#sasl_sql_engine: mysql
## all possible values.
sasl_mech_list: LOGIN PLAIN CRAM-MD5 DIGEST-MD5 NTLM
## or limit to CRAM-MD5 only
#sasl_mech_list: CRAM-MD5
## change below to suit your setup.
sasl_sql_user: mailsqluser
sasl_sql_passwd: password
sasl_sql_database: mailsqldb
sasl_sql_hostnames: localhost
sasl_sql_select: SELECT clear FROM users WHERE email = '%u@%r'
# cat cyrus.conf
START {
# Do not delete this entry!
recover cmd="ctl_cyrusdb -r"
# This is only necessary if using idled for IMAP IDLE.
#idled cmd="idled"
}
# UNIX sockets start with a slash and are put into /var/imap/socket.
SERVICES {
# Add or remove based on preferences.
imap cmd="imapd" listen="imap2" prefork=0
#pop3 cmd="pop3d" listen="pop-3" prefork=0
# Don't forget to generate the needed keys for SSL or TLS
# (see doc/html/install-configure.html).
imaps cmd="imapd -s" listen="imaps" prefork=0
#pop3s cmd="pop3d -s" listen="pop3s" prefork=0
sieve cmd="timsieved" listen="sieve" prefork=0
# at least one LMTP is required for delivery
#lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/mail/imap/socket/lmtp" prefork=0
# this is only necessary if using notifications
#notify cmd="notifyd" listen="/var/imap/socket/notify" proto="udp" prefork=1
}
Собственно говоря, это основное. Там где разобрался -- могу дать пояснения, особенно по sendmail.mc.
Sendmail+Cyrus-IMAP+ SASL+Spamassassin+Clamav (ПОЧТОВЫЙ СЕРВЕР)
Модератор: /dev/random