Linux
--
Questions
--
Followers
Top Experts
1. all mail is sent from localhost.localdoman
2. Can't seem to get Relay access file working.
Here is the /etc/hosts:
127.0.0.1 WebServer localhost.localdomain localhost
192.168.0.5 WebServer WebServer.mydomain.com
www mail
*********
mydomain.com is used in place of my real domain name for this message
************
The netstat -an|grep 25|grep tcp reports:
[root@WebServer root]# netstat -an|grep 25|grep tcp
tcp 0 0 127.0.0.1:1025 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
From what i have read, I don't think the 127.0.0.1 line should be there.
I've ran make after editing the access file and m4 after editing the the m4 command.
I've stopped and started sendmail after every change.
My domanin is fully quailified.
hostname on the machine returns:WebServer
domainame returns: mydoman.com
here is my resolv.conf:
nameserver 24.48.44.2
nameserver 24.48.44.3
nameserver 192.168.0.5
Here is my sendmail.mc file:
dnl This is the sendmail macro config file. If you make changes to this file,
dnl you need the sendmail-cf rpm installed and then have to generate a
dnl new /etc/mail/sendmail.cf by running the following command:
dnl
dnl m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
dnl
include(`/usr/share/sendma
VERSIONID(`linux setup for Red Hat Linux')dnl
OSTYPE(`linux')
dnl Uncomment and edit the following line if your mail needs to be sent out
dnl through an external mail server:
dnl define(`SMART_HOST',`smtp.
define(`confDEF_USER_ID',`
undefine(`UUCP_RELAY')dnl
undefine(`BITNET_RELAY')dn
dnl define(`confAUTO_REBUILD')
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LI
define(`confDONT_PROBE_INT
define(`PROCMAIL_MAILER_PA
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'
define(`confAUTH_OPTIONS',
dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confAUTH_MECHANISM
IN')dnl
dnl define(`confCACERT_PATH',`
dnl define(`confCACERT',`/usr/
dnl define(`confSERVER_CERT',`
dnl define(`confSERVER_KEY',`/
dnl define(`confTO_QUEUEWARN',
dnl define(`confTO_QUEUERETURN
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',`
FEATURE(`smrsh',`/usr/sbin
FEATURE(`mailertable',`has
FEATURE(`virtusertable',`h
FEATURE(redirect)dnl
FEATURE(always_add_domain)
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
dnl The '-t' option will retry delivery if e.g. the user runs over his quota.
FEATURE(local_procmail,`',
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipie
EXPOSED_USER(`root')dnl
dnl This changes sendmail to only listen on the loopback device 127.0.0.1
dnl and not on any other network devices. Comment this out if you want
dnl to accept email over the network.
dnl DAEMON_OPTIONS(`Port=smtp,
dnl NOTE: binding both IPv4 and IPv6 daemon to the same port requires
dnl a kernel patch
dnl DAEMON_OPTIONS(`port=smtp,
dnl We strongly recommend to comment this one out if you want to protect
dnl yourself from spam. However, the laptop and users on computers that do
dnl not have 24x7 DNS do need this.
dnl FEATURE(`accept_unresolvab
dnl FEATURE(`relay_based_on_MX
MAILER(smtp)dnl
MAILER(procmail)dnl
Cwlocalhost.localdomain
Thank for any help you can give
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
127.0.0.1 localhost.localdomain localhost
192.168.0.5 WebServer.mydomain.com Wenserver www mail
The Fully Qualified Domain Name (FQDN) must be first and the systems real host name can't be defined for both the localhost IP and the real IP. Next edit /etc/sysconfig/network and make sure that the hostname is defined as the FQDN, like:
HOSTNAME=WebServer.mydomai
I always like to explicitly list the server's name(s) in /etc/local-host-names, like:
localhost
webserver
www
webserver.mydomain.com
mydomain.com
With those changes in place (you can force the hostname change with 'hostname webserver.mydomaincom) restart sendmail and mail should now appear to be from the FQDN of the system. If you want the mail to appear to be from the domain instead of the hostname you'll need the Masquerade features in your sendmail.mc.
I don't know what your are trying to do with the access map so I can't yet tell you what's wrong there. If you'd explain a bit more about your needs and show me your access file we can solve the problem.
[root@WebServer mail]# mail -v alanbk@yahoo.com
Subject: Testxxx
testxxx
.
Cc:
alanbk@yahoo.com... Connecting to localhost.mydomain.com. via relay...
when i did a ping of localhost.mydomanin.com I did get response.
[root@WebServer mail]# hostname Webserver
[root@WebServer mail]# mail -v alanbk@yahoo.com
Subject: Test
TEst
.
Cc:
alanbk@yahoo.com... Connecting to localhost.localdomain. via relay...
220 webserver.abkprod.dynip.co
:13:33 -0500
>>> EHLO localhost.localdomain
250-webserver.mydomain.com
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<root@localhost.local
250 2.1.0 <root@localhost.localdomai
>>> RCPT To:<alanbk@yahoo.com>
>>> DATA
250 2.1.5 <alanbk@yahoo.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 h17HDXjU005541 Message accepted for delivery
alanbk@yahoo.com... Sent (h17HDXjU005541 Message accepted for delivery)
Closing connection to localhost.localdomain.
>>> QUIT alanbk@yahoo.com... Deferred: Connection timed out with
localhost.mydomain.com.yni
[root@WebServer mail]#






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
[root@WebServer mail]# hostname Webserver
[root@WebServer mail]# mail -v alanbk@yahoo.com
Subject: Test
TEst
.
Cc:
alanbk@yahoo.com... Connecting to localhost.localdomain. via relay...
220 webserver.abkprod.dynip.co
:13:33 -0500
>>> EHLO localhost.localdomain
250-webserver.abkprod.dyni
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<root@localhost.local
250 2.1.0 <root@localhost.localdomai
>>> RCPT To:<alanbk@yahoo.com>
>>> DATA
250 2.1.5 <alanbk@yahoo.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 h17HDXjU005541 Message accepted for delivery
alanbk@yahoo.com... Sent (h17HDXjU005541 Message accepted for delivery)
Closing connection to localhost.localdomain.
>>> QUIT alanbk@yahoo.com... Deferred: Connection timed out with
localhost.abkprod.dynip.co
[root@WebServer mail]#
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
and if you change that file that you re-make the access map.
Could I see the contents of:
1) /etc/hosts
2) /etc/sysconfig/network
3) /etc/mail/local-host-names
4) /etc/mail/access
5) the output of hostname
127.0.0.1 localhost.localdomain
192.168.0.5 WebServer WebServer.abkprod.dynip.co
[root@WebServer mail]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=WebServer.abkprod
GATEWAY=192.168.0.254
[root@WebServer mail]# cat /etc/mail/local-host-names
# local-host-names - include all aliases for your machine here.
localhost
WebServer
WebServer.abkprod.dynip.co
www
abkprod.dynip.com
[root@WebServer mail]# cat /etc/mail/access
# by default we allow relaying from localhost...
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
abkprod.dynip.com RELAY
192.168.0 RELAY
[root@WebServer mail]#hostname
webserver.abkprod.dynip.co
The timeout error:
[root@WebServer mail]# alanbk@yahoo.com... Deferred: Connection timed out with localhost.abkprod.dynip.co

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
127.0.0.1 localhost.localdomain
192.168.0.5 WebServer WebServer.abkprod.dynip.co
[root@WebServer mail]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=WebServer.abkprod
GATEWAY=192.168.0.254
[root@WebServer mail]# cat /etc/mail/local-host-names
# local-host-names - include all aliases for your machine here.
localhost
WebServer
WebServer.abkprod.dynip.co
www
abkprod.dynip.com
[root@WebServer mail]# cat /etc/mail/access
# by default we allow relaying from localhost...
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
abkprod.dynip.com RELAY
192.168.0 RELAY
[root@WebServer mail]#hostname
webserver.abkprod.dynip.co
The timeout error:
[root@WebServer mail]# alanbk@yahoo.com... Deferred: Connection timed out with localhost.abkprod.dynip.co
127.0.0.1 localhost.localdomain localhost
192.168.0.5 WebServer.abkprod.dynip.co
The FQDN (WeBServer.abkprod.dynip.c
I don't think it does any harm, but you don't need abkprod.dynip.com RELAY
in the access map. It will suffice to have:
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
192.168.0 RELAY
That allows mail from the localhost variants as well as from any machine in the 192.168.0.0/24 network relay access through the server.
Ive made the changes to the /etc/hosts.
Here is the new /etc/hosts:
[root@WebServer mail]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.0.5 WebServer.abkprod.dynip.co
[root@WebServer mail]#
Same result it hangs and times out:
[root@WebServer mail]# mail -v alanbk@yahoo.com
Subject: TEST
TEST
.
Cc:
alanbk@yahoo.com... Connecting to localhost.abkprod.dynip.co
Any other ideas? Want to telnet in? I really appreciate your help.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
To be able to look at the relevant bit's & pieces I'd need root privs and that is best done via sudo. Email me at jim@entrophy-free.net and we'll exchange details.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
everytime you make changes to /etc/mail/aliases
you run the "make" command to have sendmail refresh its files
everytime you make changes to your sendmail.mc you run the
"m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf" to refresh its macros
~drew
if you just want localhost mail then do the
DAEMON_OPTIONS(`Port=smtp,
if you just want localhost mail then do the
DAEMON_OPTIONS(`Port=smtp,






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
I will leave a recommendation in the Cleanup topic area that this question is to:
Be PAQ'd/Points No Refunded
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Paul
EE Cleanup Volunteer
Linux
--
Questions
--
Followers
Top Experts
Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.