Included below are my config files: sendmail.mc, dovecot.m4,
dovecot.conf, dovecot-sql.conf. Whenever I try to send email into
this system, it rejects it with user does not exist, however, the
user does exist as far as dovecot (imap) is concerned, it is in the
database.
THANKS - Yossie
# for i in /etc/dovecot/dovecot.conf /etc/dovecot/dovecot-sql.conf /
usr/share/sendmail-cf/mailer/dovecot.m4 /etc/mail/sendmail.mc; do
echo "FILE: $i"; echo ===; echo ""; egrep -v '^ *(#|$)' $i; echo "";
echo ""; done
FILE: /etc/dovecot/dovecot.conf
listen = [::] disable_plaintext_auth = no ssl_disable = yes ssl_cert_file = /etc/ssl/dovecot/server.pem ssl_key_file = /etc/ssl/dovecot/server.key mail_location = maildir:~/.maildir namespace private { separator = . inbox = yes hidden = no } namespace private { separator = . prefix = INBOX. inbox = no hidden = yes } first_valid_uid = 0 protocol imap { } protocol pop3 { } protocol lda { postmaster_address = postmaster@example.com main_plugin_dir = /usr/lib/dovecot/lda mail_plugins = cmusieve quota } auth default { mechanisms = plain passdb sql { args = /etc/dovecot/dovecot-sql.conf } userdb sql { args = /etc/dovecot/dovecot-sql.conf } user = root socket listen { master { path = /var/run/dovecot/auth-master mode = 0666 } client { path = /var/run/dovecot/auth-client mode = 0666 } } } dict { } plugin { }
FILE: /etc/dovecot/dovecot-sql.conf
driver = mysql
connect = host=localhost dbname=dovecot user=root
default_pass_scheme = PLAIN
password_query = SELECT userPassword as password, user, concat("/var/
spool/dovecot/",substr(user,1,1),"/user/",user) as userdb_home, 97 as
userdb_uid, 97 as userdb_gid FROM authdb WHERE user = '%n' and
userPassword = '%w'
user_query = SELECT concat("/var/spool/imap/",substr(user,1,1),"/
user/",user) as home, 97 as uid, 97 as gid FROM authdb WHERE user = '%n'
FILE: /usr/share/sendmail-cf/mailer/dovecot.m4
Mdovecot, P=/usr/libexec/dovecot/deliver, F=DFMPhnu9, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP, T=DNS/RFC822/X-Unix, A=deliver -d $u
FILE: /etc/mail/sendmail.mc
divert(-1)
dnl This is the macro config file used to generate the /etc/sendmail.cf
dnl file. If you modify the file you will have to regenerate the
dnl /etc/sendmail.cf by running this macro config through the m4
dnl preprocessor:
dnl
dnl m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
dnl
dnl You will need to have the sendmail-cf package installed for this to
dnl work.
include(/usr/share/sendmail-cf/m4/cf.m4')dnl define(
confDEF_USER_ID',``mail:mail'')dnl
OSTYPE(linux')dnl undefine(
UUCP_RELAY')dnl
undefine(BITNET_RELAY')dnl define(
confALIAS_WAIT', 30')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 dnl define delivery mode: interactive, background, or queued dnl define(
confDELIVERY_MODE', i') MASQUERADE_AS(
ford.qa.laszlosystems.com')dnl
FEATURE(limited_masquerade')dnl FEATURE(
masquerade_envelope')dnl
FEATURE(smrsh',
/usr/sbin/smrsh')dnl
FEATURE(mailertable)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(always_add_domain)dnl
FEATURE(redirect)dnl
FEATURE(use_cw_file)dnl
FEATURE(local_procmail)dnl
FEATURE(access_db')dnl FEATURE(
blacklist_recipients')dnl
FEATURE(relay_based_on_MX')dnl dnl FEATURE(dnsbl,
blackholes.mail-abuse.org', Rejected - see http://www.mail-abuse.org/rbl/')dnl dnl FEATURE(dnsbl,
dialups.mail-abuse.org', Dialup - see http:// www.mail-abuse.org/dul/')dnl dnl FEATURE(dnsbl,
relays.mail-abuse.org', Open spam relay - see http://www.mail-abuse.org/rss/')dnl FEATURE(
delay_checks')dnl
FEATURE(stickyhost')dnl dnl SASL Configuration dnl extract from http://www.sendmail.org/~ca/email/auth.html dnl dnl Next two lines are for SMTP Authentication TRUST_AUTH_MECH(
LOGIN PLAIN')dnl
define(confAUTH_MECHANISMS',
LOGIN PLAIN')dnl
dnl
dnl Next line stops sendmail from allowing auth without encryption
define(confAUTH_OPTIONS',
Apy')dnl
dnl
dnl STARTTLS configuration
dnl extract from http://www.sendmail.org/~ca/email/starttls.html
dnl
define(CERT_DIR',
/etc/ssl/sendmail')dnl
define(confCACERT_PATH',
CERT_DIR')dnl
define(confCACERT',
CERT_DIR/CAcert.pem')dnl
define(confSERVER_CERT',
CERT_DIR/MYcert.pem')dnl
define(confSERVER_KEY',
CERT_DIR/MYkey.pem')dnl
define(confCLIENT_CERT',
CERT_DIR/MYcert.pem')dnl
define(confCLIENT_KEY',
CERT_DIR/MYkey.pem')dnl
dnl
dnl Uncomment next lines to hide identity of mail serve
define(confPRIVACY_FLAGS',
goaway,restrictqrun,restrictmailq')dnl
dnl define(confSMTP_LOGIN_MSG',
$j server ready at $b')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
MAILER(dovecot)dnl
ford dovecot #