LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-16-2015, 04:21 AM   #1
niente0
LQ Newbie
 
Registered: Sep 2012
Posts: 5

Rep: Reputation: Disabled
Unhappy E-mail accepted even if not present in virtusertable!


Hi,
I use Sendmail, my local-host-names file is like this:

Code:
firstdomain.com
seconddomain.com
My virtusertable is like this:

Code:
user1@firstdomain.com     user1
@seconddomain.com     error:nouser User unknown
My problem is that when I write to user1@seconddomain.com the message does not return an error but is delivered to user1, even if user1@seconddomain.com is not present in virtusertable.

How can I solve it? Any suggestion?
Thank you
 
Old 11-16-2015, 05:48 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

My guess is that you didn't rebuild virtusertable. What gives
Code:
sendmail -bv user1@seconddomain.com
To rebuild virtusertable, you have to run:
Code:
makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable
 
Old 11-16-2015, 08:04 AM   #3
niente0
LQ Newbie
 
Registered: Sep 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thank you for your answer.
Virtusertable is updated (I run makemap very often), and here's the result of sendmail -bv user1@seconddomain.com:
Code:
user1@seconddomain.com... deliverable: mailer local, user user1
It is a long time that I have this problem, I cannot find a solution. I guess it's something with some parameter in sendmail.mc...

Here'st my sendmail.mc, hoping it's useful. I'm running Centos v6.7, Sendmail 8.14.4, Dovecot v2.0.9, Procmail v3.22.

Quote:
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', `2m')dnl
define(`confTO_DATAINIT', `8m')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(`confMAXRCPTSPERMESSAGE', `30')dnl
define(`confMAX_MESSAGE_SIZE', `15000000')dnl
define(`confHELO_NAME', `mail.xxxxxxxx.com')dnl
define(`confMCI_CACHE_SIZE',`10')dnl
define(`confTO_RESOLVER_RETRY',`3')dnl
define(`confAUTH_OPTIONS', `A p')dnl
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
define(`confSERVER_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl
define(`confSERVER_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl
define(`confCLIENT_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl
define(`confCLIENT_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl
define(`confQUEUE_LA', `16')dnl
define(`confREFUSE_LA', `64')dnl
define(`confTO_IDENT', `0')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<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
Thanks again

Last edited by niente0; 11-16-2015 at 10:27 AM. Reason: Added my sendmail.mc
 
Old 11-16-2015, 11:54 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Virtusertable is updated (I run makemap very often)
You should run it every time you change virtusertable


Quote:
sendmail -bv user1@seconddomain.com:
user1@seconddomain.com... deliverable: mailer local, user user1
Doh, maybe the following is the problem
Quote:
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
I've never used it, so I don't know what it does really. You can disable it temporarily from sendmail.cf, by commenting out "O UserDatabaseSpec=/etc/mail/userdb" and see if it works.
If that doesn't work try to reverse the entries order in /etc/mail/virtusertable
Code:
@seconddomain.com     error:nouser User unknown
user1@firstdomain.com     user1
 
Old 11-16-2015, 03:35 PM   #5
niente0
LQ Newbie
 
Registered: Sep 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thank you very much for your suggestions.
I have no /etc/mail/userdb.db file, so I think it's a predefined (unused) setting left in sendmail.mc.

Anyway, I just discovered that I get this problem only when I send an e-mail message from another address that resides on the same server. While if I write an email to the non-existent address from an "outside" account, message is correctly refused (unknown user).

So this behavior is far less annoying after this discovery, I think I can live with this...

Thank you for your help!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cyrus login with mail alias in virtusertable? pete83 Linux - Server 0 01-14-2014 05:45 PM
/etc/mail/virtusertable Issue?? your_shadow03 Linux - Newbie 12 10-04-2009 01:35 PM
SpamAssassin not processesing e-mail w/ remote addresses in virtusertable RedHatDude Linux - Server 1 11-01-2006 08:54 PM
Sendmail /etc/mail/virtusertable not created katana Linux - General 4 03-01-2004 12:19 PM
Sendmail /etc/mail/virtusertable headache! katana Solaris / OpenSolaris 4 12-29-2002 12:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration