Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help!!

Status
Not open for further replies.

sylter

Technical User
Nov 16, 2004
6
ES
There is someone that configure sendmail before and can help me to discover my error. Please I spend few days and send mail still not work already.

Thanks!
 
sylter,
How on earth is anybody going to be able to help you with the information you provide?
 

Hi BIS!

I put this information in a message yestarday, but I can include the same informatión here.

The header is "Problem with Sendmail configuration!!!"

I think that must be a stupid mistake, the reason is that I'm new with this topic and this is why it is costing me a lot, anyway all the people say that sendmail is very hart to configure.

Thanks to people that can help me.
------------------------

Hello!


I'm trying to configure a server mail in a PC that I installed redhat 9.0, Sendmail, POP and IMAP server come instaled by defauld. Well I try to configure reading some configurations notes in the internet (There are a lot!!!) I can send e-mails from and to my local accounts with the alias, I can do this with a Edura Light POP3 client too. But it only work if I put in the field To: root or other alias, but if I try to put root@mydomain.com, it never work. I have the same problem if I try to send or receive e-mail from internet. What is wrong????
some help, please!!!


I will try to put several traces from mail.log and the configuration files:


Sending mail to an alias: From: root To:juanjo (work)


Nov 16 11:39:18 localhost sendmail[5908]: iAGAdII2005908: from=root, size=26, class=0, nrcpts=1, msgid=<200411161039.iAGAdII2005908@localhost.localdomain>, relay=root@localhost
Nov 16 11:39:18 localhost sendmail[5911]: iAGAdI57005911: from=<root@localhost.localdomain>, size=334, class=0, nrcpts=1, msgid=<200411161039.iAGAdII2005908@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Nov 16 11:39:18 localhost sendmail[5908]: iAGAdII2005908: to=juanjo, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30026, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (iAGAdI57005911 Message accepted for delivery)
Nov 16 11:39:18 localhost sendmail[5914]: iAGAdI57005911: to=<juanjo@localhost.localdomain>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30573, dsn=2.0.0, stat=Sent



Sending mail to mydomain: From root To:juanjo@sytek-dev.com (don't work)


Nov 16 11:41:45 localhost sendmail[7891]: iAGAfjQL007891: from=root, size=45, class=0, nrcpts=1, msgid=<200411161041.iAGAfjQL007891@localhost.localdomain>, relay=root@localhost
Nov 16 11:41:45 localhost sendmail[7891]: iAGAfjQL007891: to=juanjo@sytek-dev.com, delay=00:00:00, mailer=esmtp, pri=30040, dsn=4.4.3, stat=queued



Receiving mail from Internet: (don't work)


Nov 16 11:43:15 localhost sendmail[10175]: iAGAhF57010175: from=<juanjo.sytek@wanadoo.es>, size=753, class=0, nrcpts=1, msgid=<6.1.0.6.0.20041116104333.01ae8060@pop.wanadoo.es>, proto=ESMTP, daemon=MTA, relay=smtp15.eresmas.com [62.81.235.115]
Nov 16 11:43:15 localhost sendmail[10175]: iAGAhF57010175: to=<juanjo@sytek-dev.com>, delay=00:00:00, mailer=local, pri=30747, dsn=4.4.3, stat=queued



Sending mail to Internet: ( don't work)


Nov 16 11:44:58 localhost sendmail[12010]: iAGAiwXZ012010: from=root, size=41, class=0, nrcpts=1, msgid=<200411161044.iAGAiwXZ012010@localhost.localdomain>, relay=root@localhost
Nov 16 11:44:58 localhost sendmail[12010]: iAGAiwXZ012010: to=sytek@wanadoo.es, delay=00:00:00, mailer=esmtp, pri=30036, dsn=4.4.3, stat=queued





Below I show the configuration that I made:


named.conf:


localhost.localdomain IN A 127.0.0.1
localhost.localdomain IN MX 10 sytek-dev.com



Sendmail.mc


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 Red Hat Linux')dnl
OSTYPE(`linux')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.wanadoo.es')
dnl #
define(`confDEF_USER_ID',``8:12'')dnl
define(`confTRUSTED_USER', `smmsp')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
dnl define(`STATUS_FILE', `/etc/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 #
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 # make -C /usr/share/ssl/certs usage
dnl #
dnl define(`confCACERT_PATH',`/usr/share/ssl/certs')
dnl define(`confCACERT',`/usr/share/ssl/certs/ca-bundle.crt')
dnl define(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem')
dnl define(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem')
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
VIRTUSER_DOMAIN_FILE(`/etc/mail/virtuser-domains')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 -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 # 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 # NOTE: binding both IPv4 and IPv6 daemon to the same port requires
dnl # a kernel patch
dnl #
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
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 #
dnl #LOCAL_DOMAIN(`localhost.localdomain')dnl
LOCAL_DOMAIN(`sytek-dev.com')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 #
MASQUERADE_AS(`sytek-dev.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
MAILER(smtp)dnl
MAILER(procmail)dnl



Others:
I tried to put in this files anything in my desesperation.


local-host-names:
# local-host-names - include all aliases for your machine here.
sytek-dev.com


relay-domains:
sytek-dev.com


mailertable:
sytek-dev.com local:


virtuser-domains:
sytek-dev.com


trusted-users:
# trusted-users - users that can send mail as others without a warning
# apache, mailman, majordomo, uucp, are good candidates
root


more virtusertable:
juanjo@sytek-dev.com juanjo
root@sytek-dev.com root



I think that this is all, :)


I hope someone can help me and show me where is the mistake.


Thanks for reading my e-mail.
 
Sendmail can't be associated with the loopback device (127.0.0.1). It must use its eth0 address. If the sendmail server is on a network pc, then you would use its network ip i.e. 192.168.1.20 for example. For sendmail to be able to access the internet, it needs to know where the gateway is. This would be the lan ip address of your router. Now when mail comes in, it will come to your router first because it is between the internet and your network. It is connected to the internet with a public ip. This is the ip that is used in your dns "MX" record. You need to forward all smtp (port 25) and pop3 (port 110) traffic to the network ip of the mail server. If you are having a problem translating this, let me know and I'll try to rephrase it for you.
 

Thanks RhythmAce. Now the system is working properlly. I had a DNS configuration problem, this is the reason why I trace the port 25 eith tcpdump and I could see the data flowing. I put the Debug level at 16 in Sendmail and I coud see that there was a TimeOut always that I tried to send or receive an e-mail from Internet, and when I used my domain too. I think that I was OK with the sendmail configuration at the begining. Maybe can be a few mistakes but it si working now, when I resolve the DNS configuration.

The named.conf did nothing, because the sistem work in the same way with this data and without. The MX in my computer never work. I have a MX in my ISP that redirect SMTP traffic to my public IP, when I do it that I thougt that I must to do this in my computer too, but it not right because I don't have a DNS system working. I resolve the problem writing in the resolv.conf the IPs of the DNS of my ISP provider.

Thanks anyway, and I want to give thatnks to all the people that wrote in this forum, it was interesting for me to read several post, they are very good.

Juanjo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top