Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am facing a problem while configuring a sendmail AS MY MTA
My problem is when is try to send mail from root to local user account(Any user existing in my local machine) , i m getting a unknown user error but normal users can successfully send a mail to root but root account does not
I can successfully compile a sendmail.mc without any error and sendmail deamons start successfully
When I Try to send mail from root account to local user Account , i got a Returned mail:see transcript for detail (which Has A following Detai )
Date: Tue, 30 Nov 2010 13:07:21 +0530
From: Mail Delivery Subsystem <MAILER-DAEMON@ducat.com>
To: <root@server.ducat.com>
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
divert(-1)dnl
dnl #
dnl # This is the sendmail macro config file for m4. If you make changes to
dnl # /etc/mail/sendmail.mc, you will need to regenerate the
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is
dnl # installed and then performing a
dnl #
dnl # make -C /etc/mail
dnl #
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
dnl #
dnl # Do not advertize sendmail version.
dnl #
dnl define(`confSMTP_LOGIN_MSG', `$j Sendmail; $b')dnl
dnl #
dnl # default logging level is 9, you might want to set it higher to
dnl # debug the configuration
dnl #
dnl define(`confLOG_LEVEL', `9')dnl
dnl #
dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
dnl define(`SMART_HOST', `smtp.your.provider')dnl
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
dnl #
dnl # The following allows relaying if the user authenticates, and disallows
dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links
dnl #
dnl define(`confAUTH_OPTIONS', `A p')dnl
dnl #
dnl # PLAIN is the preferred plaintext authentication method and used by
dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do
dnl # use LOGIN. Other mechanisms should be used if the connection is not
dnl # guaranteed secure.
dnl # Please remember that saslauthd needs to be running for AUTH.
dnl #
dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl #
dnl # Rudimentary information on creating certificates for sendmail TLS:
dnl # cd /usr/share/ssl/certs; make sendmail.pem
dnl # Complete usage:
dnl # make -C /usr/share/ssl/certs usage
dnl #
dnl define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
dnl define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
dnl define(`confSERVER_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl
dnl define(`confSERVER_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl
dnl #
dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's
dnl # slapd, which requires the file to be readble by group ldap
dnl #
dnl define(`confDONT_BLAME_SENDMAIL', `groupreadablekeyfile')dnl
dnl #
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl define(`confTO_QUEUERETURN', `5d')dnl
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
define(`confTO_IDENT', `0')dnl
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
dnl #
dnl # The following limits the number of processes sendmail can fork to accept
dnl # incoming messages or process its message queues to 20.) sendmail refuses
dnl # to accept connections once it has reached its quota of child processes.
dnl #
dnl define(`confMAX_DAEMON_CHILDREN', `20')dnl
dnl #
dnl # Limits the number of new connections per second. This caps the overhead
dnl # incurred due to forking new sendmail processes. May be useful against
dnl # DoS attacks or barrages of spam. (As mentioned below, a per-IP address
dnl # limit would be useful but is not available as an option at this writing.)
dnl #
dnl define(`confCONNECTION_RATE_THROTTLE', `3')dnl
dnl #
dnl # The -t option will retry delivery if e.g. the user runs over his quota.
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
dnl #
dnl # For using Cyrus-IMAPd as POP3/IMAP server through LMTP delivery uncomment
dnl # the following 2 definitions and activate below in the MAILER section the
dnl # cyrusv2 mailer.
dnl #
dnl define(`confLOCAL_MAILER', `cyrusv2')dnl
dnl define(`CYRUSV2_MAILER_ARGS', `FILE /var/lib/imap/socket/lmtp')dnl
dnl #
dnl # The following causes sendmail to only listen on the IPv4 loopback address
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 587 for
dnl # mail from MUAs that authenticate. Roaming users who can't reach their
dnl # preferred sendmail daemon due to port 25 being blocked or redirected find
dnl # this useful.
dnl #
dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 465, but
dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed
dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't
dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS
dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps
dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.
dnl #
dnl # For this to work your OpenSSL certificates must be configured.
dnl #
dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
dnl #
dnl # The following causes sendmail to additionally listen on the IPv6 loopback
dnl # device. Remove the loopback address restriction listen to the network.
dnl #
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
dnl #
dnl # enable both ipv6 and ipv4 in sendmail:
dnl #
dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')
dnl #
dnl # We strongly recommend not accepting unresolvable domains if you want to
dnl # protect yourself from spam. However, the laptop and users on computers
dnl # that do not have 24x7 DNS do need this.
dnl #
FEATURE(`accept_unresolvable_domains')dnl
dnl #
dnl FEATURE(`relay_based_on_MX')dnl
dnl #
dnl # Also accept email sent to "localhost.localdomain" as local email.
dnl #
LOCAL_DOMAIN(`localhost.localdomain')dnl
dnl #
dnl # The following example makes mail from this host and any additional
dnl # specified domains appear to be sent from mydomain.com
dnl #
dnl MASQUERADE_AS(`mydomain.com')dnl
dnl #
dnl # masquerade not just the headers, but the envelope as well
dnl #
dnl FEATURE(masquerade_envelope)dnl
dnl #
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
dnl #
dnl FEATURE(masquerade_entire_domain)dnl
dnl #
dnl MASQUERADE_DOMAIN(localhost)dnl
dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
server IN A 192.168.10.1
station1 IN A 192.168.10.2
station2 IN A 192.168.10.3
station3 IN A 192.168.10.4
station4 IN A 192.168.10.5
station5 IN A 192.168.10.6
station6 IN A 192.168.10.7
station7 IN A 192.168.10.8
station8 IN A 192.168.10.9
station9 IN A 192.168.10.10
station10 IN A 192.168.10.11
IN MX 10 mail.ducat.com.
mail IN CNAME server
ftp IN CNAME server
www IN CNAME server
Your dns does not know the MX record for your domain because of some "errors" you have. Change the zone file to the following:
Code:
$ORIGIN ducat.com.
$TTL 86400
@ IN SOA server.ducat.com. admin.ducat.com. (
2010111907 ;<---- increase the serial
3H ;refresh
20M ;retry
1W ;expire
1D) ;minimum
IN NS server.ducat.com.
IN MX 10 mail.ducat.com.
server IN A 192.168.10.1
station1 IN A 192.168.10.2
station2 IN A 192.168.10.3
station3 IN A 192.168.10.4
station4 IN A 192.168.10.5
station5 IN A 192.168.10.6
station6 IN A 192.168.10.7
station7 IN A 192.168.10.8
station8 IN A 192.168.10.9
station9 IN A 192.168.10.10
station10 IN A 192.168.10.11
mail IN A 192.168.10.1
ftp IN CNAME server
www IN CNAME server
The MX RR should follow NS and it's better not to use a CNAME for it. Use an A RR pointing to the IP of the CNAME.
Also you need at least a blank space at the beginning of the NS and MX lines.
server IN A 192.168.10.1
mail IN A 192.168.10.1
station1 IN A 192.168.10.2
station2 IN A 192.168.10.3
station3 IN A 192.168.10.4
station4 IN A 192.168.10.5
station5 IN A 192.168.10.6
station6 IN A 192.168.10.7
station7 IN A 192.168.10.8
station8 IN A 192.168.10.9
station9 IN A 192.168.10.10
station10 IN A 192.168.10.11
ftp IN CNAME server
www IN CNAME server
This is the output of my maillog file When i try to send mail to my local user(Ashish)
Dec 1 14:31:14 server sendmail[7180]: oB191EMs007180: to=Ashish@server.ducat.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30286, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
This is the output of my maillog when i try to send a mail to root@station9.ducat.com Dec 1 15:00:21 server sendmail[9109]: oB19ULdp009107: to=<root@station9.ducat.com>, ctladdr=<root@server.ducat.com> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120441, relay=station9.ducat.com. [192.168.10.10], dsn=4.0.0, stat=Deferred: Connection refused by station9.ducat.com.
Every one can able to send a mail to my server , whether it is a local user to any dns client but i m not , i dont know how to fix it .
This is puzzling me. Are you sure the user exists? Can you try the sendmail -bv command with some other system user (like nobody@server.ducat.com)?
Can you run adduser to create another user and see if mail works for him?
YES i m sure about the user Ashish is exist in my System , i can log in from this user and also i can send the mail from Ashish user to root@server.ducat.com, same for station9.ducat.com system, i can send mail from root@station9.ducat.com to root@server.ducat.com but not vice versa, its also puzzle me alot bathory
There is no mail server running on station9.ducat.com (192.168.10.10) as you get a "connection refused" error. Or it's not reachable because of a firewall.
Did you try the sendmail -bv command for some other user that exists in /etc/passwd?
Yes u r right the problem is lies only with Ashish user
i also have another user name sample in which i dont have problem we both can exchange the mails on the same system, i dont know why this problem only lies with user Ashish
Another thing is that the client system which is connected to my server system via LAN can send me a mail , but i cant send a mail to any one , i want to know is there is any configuration which i need to configure on my client system
i dont know why this problem only lies with user Ashish
Take a look at /etc/mail/virtusertable and /etc/mail/aliases to see if you find anything
Quote:
Another thing is that the client system which is connected to my server system via LAN can send me a mail , but i cant send a mail to any one , i want to know is there is any configuration which i need to configure on my client system
If you're trying to send mail to users on other hosts, you need a mailserver running on those hosts as I've already told you.
Else post sendmail logs and maybe the DSN you get but after the failure.
i didnt find anything regarding with anything /etc/aliases /etc/mail/virtusertable & /etc/mail/aliases, user ashish cant send mail but all user can able to send mail. but problem still with sendmail mail
one more thing bethory i m using thunderbird as my mail client
when i try to login in thunderbird by supplying My name(Your Name), E-mail ID, root (user) , after the it automatically detect my sendmail server setting , and when i supply my root password , it deny me and giving me a message invalid user id and password. but on the other hand this issue is not with other user who existing into my system .
i didnt find anything regarding with anything /etc/aliases /etc/mail/virtusertable & /etc/mail/aliases, user ashish cant send mail but all user can able to send mail. but problem still with sendmail mail
You said that user cannot get mail but can send normally, so I guess you made a mistake.
Anyway, I don't know how did you create the user ashish, but you can try to delete it and re-create it.
Or you can add
when i try to login in thunderbird by supplying My name(Your Name), E-mail ID, root (user) , after the it automatically detect my sendmail server setting , and when i supply my root password , it deny me and giving me a message invalid user id and password. but on the other hand this issue is not with other user who existing into my system .
You cannot use pop to get root's mail remotely. It is disabled by default for security reasons
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.