MoonPoint Support Logo


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals

Advanced Search
Sun Mon Tue Wed Thu Fri Sat
23 24
25 26 27 28 29 30 31
Apr May Jun
Jul Aug Sep
Oct Nov Dec

Sat, Jan 06, 2018 5:01 pm

Configuring Sendmail to always allow Steam email

A family member wasn't receiving email for a Steam account she created to play a PC game. Her email comes through a Sendmail email server I manage and I found that a Domain Name System-based Blackhole List (DNSBL), the Spam and Open Relay Blocking System (SORBS), had blocked email from the IP address that Valve had for the email server used to send email to her about the account. When I checked the sendmail log file, I found the following two entries:

Dec 29 21:10:26 moonpoint sendmail[27413]: ruleset=check_relay, arg1=smtp03.stea, arg2=, [], rej
ect=550 5.7.1 Spam Block:mail from refused - see http://dnsbl.sorb
Dec 29 21:17:35 moonpoint sendmail[27661]: ruleset=check_relay, arg1=smtp01.stea, arg2=, [], rej
ect=550 5.7.1 Spam Block:mail from refused - see http://dnsbl.sorb

Checking, I found the following IP addresses and fully qualified domain names (FQDNs) for Steam email servers:

IP AddressFQDN

To ensure that none of the DNSBLs I use with Sendmail will ever block email from the Steam email servers, I added the following lines to /etc/mail/access:

Connect:                           OK
Connect:                           OK
Connect:                           OK
Connect:                           OK
Connect:                           OK

I then used the makemap hash command to rebuild the access database.

# makemap hash /etc/mail/access </etc/mail/access

Once I did that, she was able to receive the Steam-related email.

[/network/email/sendmail] permanent link

Thu, Jan 05, 2017 4:02 pm

Email stuck in the sendmail queue

A user repoted that she didn't receive an email someone sent her today. I checked the /var/log/maillog file to see if the mail server, which is running Sendmail, received the email. When I searched on part of the sender's email address, I saw the message had been received by the mail server:

# grep sbear /var/log/maillog
Jan  5 14:08:08 moonpoint sendmail[6276]: v05IxmvR006276: from=<sbearab1@y0hoo.c
om>, size=2339942, class=0, nrcpts=1, msgid=<1226622358.574156.1483642780691@mai>, proto=ESMTP, daemon=MTA, [98.138.

So I checked Sendmail's queue with the mailq command and saw the message was stuck there. Note: Mailq is identical to sendmail -bp .

# mailq
                        /var/spool/mqueue (1 request)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
v05IxmvR006276  2338155 Thu Jan  5 14:08 <>
                 (host map: lookup ( deferred)
                Total requests: 1

The sendmail queue can be flushed with the command sendmail -q -v .

#  sendmail -q -v

Running /var/spool/mqueue/v05IxmvR006276 (sequence 1 of 1)
<>... aliased to ann
ann... Connecting to local...
ann... Sent
# mailq
/var/spool/mqueue is empty
                Total requests: 0

The meaning of the -q and -v options to the sendmail command are shown below:

              Process saved messages in the queue at given intervals.  If time
              is  omitted,  process the queue once.  Time is given as a tagged
              number, with `s' being seconds, `m' being minutes (default), `h'
              being  hours, `d' being days, and `w' being weeks.  For example,
              `-q1h30m' or `-q90m' would both set  the  timeout  to  one  hour
              thirty  minutes.   By  default,  sendmail  will run in the back-
              ground.  This option can be used safely with -bd.

      -v     Go into verbose mode.  Alias expansions will be announced, etc.

[/network/email/sendmail] permanent link

Sat, Sep 03, 2016 9:26 pm

SparkPost smart host issue with Sendmail

I recently created a SparkPost account to use SparkPost for smart host email delivery service for an organization's monthly newsletter distribution by email. SparkPost provides a free level of service that will allow one to send up to 100,000 messages per month. I had switched back to another service, but when I discovered a problem with deliveries through the other service yesterday, I reconfigured Sendmail to use the SparkPost SMTP server as the smart host. To use the SparkPost SMTP server,, as the smart host, I had the following lines in /etc/mail/, but email was not reaching recipients.

dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
define(`RELAY_MAILER_ARGS', `TCP $h 587')
define(`ESMTP_MAILER_ARGS', `TCP $h 587')
define(`SMART_HOST', `')dnl

[ More Info ]

[/network/email/sendmail] permanent link

Sat, Sep 03, 2016 1:37 pm

Deleting the files associated with a mailq entry

While troubleshooting an email delivery problem on a CentOS 7 Linux server running Sendmail, I saw an unexpected entry when I checked the mail queue with the mailq command.

# mailq
                /var/spool/mqueue (7 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
u83BWu3X020476     1010 Sat Sep  3 07:32 <>
                 (Deferred: Connection refused by

The system was running Apache, but I would not expect any email to originate from Apache destined for a Yahoo email address.

The contents of queued email are stored in the /var/spool/mqueue directory. For a queued message there will normally be two files, one beginning with the letters "df" and the other with the letters "qf", containing the queue id, in this case u83BWu3X020476, as the rest of the file name.

# ls /var/spool/mqueue/??u83BWu3X020476
/var/spool/mqueue/dfu83BWu3X020476  /var/spool/mqueue/qfu83BWu3X020476

Note: you will only be able to access these files from the root account.

[ More Info ]

[/network/email/sendmail] permanent link

Fri, Sep 02, 2016 10:32 pm

No longer need to run m4 to rebuild under CentOS 7

When I was running Sendmail on a CentOS 5 server, I needed to use the m4 command after modifying /etc/ to rebuild /etc/ from that file, i.e., m4 /etc/mail/ > /etc/mail/ E.g., see Configuring Sendmail to Use a Smart Host, but that is no longer needed with CentOS 7 and, though I went from CentOS 5 to 7, may have gone away as a needed step in CentOS 6. Now, if you modify /etc/, when you restart sendmail, e.g., with service sendmail restart, the file is automatically rebuilt.

[ More Info ]

[/network/email/sendmail] permanent link

Thu, Aug 18, 2016 10:46 pm

Bitdefender milter causing Sendmail restart failure

I needed to change the smart host setting for a Sendmail email server, so I edited /etc/mail/ and rebuilt /etc/mail/ with the m4 command. I then attempted to restart Sendmail, but it did not restart.

# m4 /etc/mail/ > /etc/mail/
# service sendmail restart
Redirecting to /bin/systemctl restart  sendmail.service
Job for sendmail.service failed because the control process exited with error code. See "systemctl status sendmail.service" and "journalctl -xe" for details.

When I issued a systemctl status sendmail.service command for further information, I saw the following:

# systemctl status sendmail.service
‚óŹ sendmail.service - Sendmail Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/sendmail.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2016-08-18 15:40:49 EDT; 11s ago
  Process: 25578 ExecStart=/usr/sbin/sendmail -bd $SENDMAIL_OPTS $SENDMAIL_OPTARG (code=exited, status=78)
  Process: 25573 ExecStartPre=/etc/mail/make aliases (code=exited, status=0/SUCCESS)
  Process: 25570 ExecStartPre=/etc/mail/make (code=exited, status=0/SUCCESS)
 Main PID: 3394 (code=exited, status=0/SUCCESS)

Aug 18 15:40:49 systemd[1]: Starting Sendmail Mail Transport A....
Aug 18 15:40:49 sendmail[25578]: 554 5.0.0 /etc/mail/sendmail....d
Aug 18 15:40:49 sendmail[25578]: NOQUEUE: SYSERR(root): /etc/m...d
Aug 18 15:40:49 sendmail[25578]: NOQUEUE: SYSERR(root): InputF...y
Aug 18 15:40:49 sendmail[25578]: 451 4.0.0 InputFilter BitDefe...y
Aug 18 15:40:49 systemd[1]: sendmail.service: control process ...8
Aug 18 15:40:49 systemd[1]: Failed to start Sendmail Mail Tran....
Aug 18 15:40:49 systemd[1]: Unit sendmail.service entered fail....
Aug 18 15:40:49 systemd[1]: sendmail.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

When I undid the changes I had made to, the issue remained. When I used the journalctl command to check on the problem, I saw the following:

# journalctl -xe
-- Unit sendmail.service has failed.
-- The result is failed.
Aug 18 15:43:25 systemd[1]: Dependency failed for Sendmail Mail Tr
-- Subject: Unit sm-client.service has failed
-- Defined-By: systemd
-- Support:
-- Unit sm-client.service has failed.
-- The result is dependency.
Aug 18 15:43:25 systemd[1]: Job sm-client.service/start failed wit
Aug 18 15:43:25 systemd[1]: Unit sendmail.service entered failed s
Aug 18 15:43:25 systemd[1]: sendmail.service failed.
Aug 18 15:43:25 polkitd[771]: Unregistered Authentication Agent fo
Aug 18 15:43:53 sshd[25845]: Address maps to wimax13
Aug 18 15:43:53 sshd[25845]: Invalid user log from
Aug 18 15:43:53 sshd[25845]: input_userauth_request: invalid user 
Aug 18 15:43:53 sshd[25845]: pam_unix(sshd:auth): check pass; user
Aug 18 15:43:53 sshd[25845]: pam_unix(sshd:auth): authentication f
Aug 18 15:43:55 sshd[25845]: Failed password for invalid user log 
Aug 18 15:43:56 sshd[25845]: Connection closed by [p
lines 1490-1512/1512 (END)

[ More Info ]

[/network/email/sendmail] permanent link

Mon, Aug 01, 2016 11:08 pm

Determining the version of Microsoft Windows from the command line

You can determine the version of Microsoft Windows on a system from a command line interface (CLI), e.g., a command prompt, using the systeminfo command. Since that command will provide a lot of other information on the system, you can filter the output to see only the operating system (OS) version by piping its output into the findstr command using the "|" pipe character. The command below will show only the operating system version:
C:\>systeminfo | findstr /R "^OS.Version"
OS Version:                10.0.10586 N/A Build 10586


The /R option indicates that the findstr command should perform its search based on a regular expression. The "^" character is a character that when included in a regular expression means that what follows should be at the beginning of the line. Without it, you could see something like the following, instead, since "BIOS Version also matches:

C:\>systeminfo | findstr /R "OS.Version"
systeminfo | findstr /R "OS.Version"
OS Version:                10.0.10586 N/A Build 10586
BIOS Version:              Dell Inc. A04, 11/21/2011


The period between "OS" and "Version" indicates in a regular expression that any one character in that space will match; in this case there is a space character between the two words, which will match the period in a regular expression. If you want to have a period treated as a period rather than serving its function as a regular expression character, you can "escape" its meaning by using the backslash, i.e. "\", escape character.

[ More Info ]

[/network/email/sendmail] permanent link

Sat, Jul 30, 2016 10:39 pm

BitDefender Free Antispam for Mail Servers (FRAMS) with Sendmail

I have been using several email blacklists on a CentOS 7 server where I use Sendmail to handle email. The blacklists, aka blocklists, I've been employing are DNS-based Blackhole Lists (DNSBLs). A DNSBL is a list of IP addresses known to be associated with the transmission of spam. The ones I've been using are listed below:

I configured Sendmail to use those blacklists by putting the following lines in /etc/mail/

FEATURE(`dnsbl', `', `550 Spam Block: mail from $&{client_addr} refused - See')dnl
FEATURE(`dnsbl', `', `550 Spam Block: mail from $&{client_addr} refused - see')dnl
FEATURE(`dnsbl',`',`550 Spam Block: mail from $&{client_addr} refused - see')dnl
FEATURE(`dnsbl',`',`550 Spam Block: mail from $&{client_addr} refused - see')dnl
FEATURE(`enhdnsbl', `', `"Spam blocked see:"$&{client_addr}', `t')dnl

If you add those lines to the Sendmail configuration file, you need to regenerate /etc/mail/ with the command m4 /etc/mail/ > /etc/mail/ Then restart sendmail with service sendmail restart.

Still, despite those multiple anti-spam blacklists, a lot of spam is getting through to accounts on the mail server. So I decided to install Free Antispam for Mail Servers (FRAMS) from Bitdefender, which describes the software thusly:

Bitdefender Free Antispam for Mail Servers provides essential features for increased productivity in any organization by blocking spam on Linux-based mail servers. Bitdefender's award winning antispam engines provide antiphishing, content and attachment filtering. It's extremely easy to install and administrators have an easy to use web-based interface and powerful command line management.

[ More Info ]

[/network/email/sendmail] permanent link

Mon, Jul 25, 2016 10:22 pm

Checking sendmail mail delivery from the command line

A user reported problems with email deliveries this morning, but when I checked the outgoing mail queue with the mailq command on the CentOS 7 server running sendmail, the queue was empty.
# mailq
/var/spool/mqueue is empty
		Total requests: 0

I tried sending a test message from the mail sever to an external email account with the mailx command. For the body of the message, I put some text into a file named test.txt and used the < character to provide the contents of the file as input to mailx for the body of the message. I didn't receive any error message and I didn't see any messages stuck in the mail queue when I checked it after I sent the message. But the message was not received at the destination email account.

# mailx -s "Testing" <test.txt
# mailq
/var/spool/mqueue is empty
		Total requests: 0

So I then used the sendmail command, instead, to send a test message to see if it would provide me with any information that I could use for troubleshooting the problem. I created a file with the following contents to send as a test message.

# cat temp.txt
Subject: Sendmail test

This is a test.
This is only a test.

You can send a test message whose contents are contained in a text file from a command line interface using a sendmail command in the form sendmail recipient_email_address < input_file. But when I did that, I saw a "Connection refused by []" message.

[ More Info ]

[/network/email/sendmail] permanent link

Sat, Jun 04, 2016 10:52 pm

Local host name is not qualified

After updating /etc/aliases on a CentOS 7 system that uses sendmail for transmitting email by adding a new alias, I ran newalises. When I did so, it took a fair amount of time for the command to complete and when it did I saw the error message below:

[root@moonpoint ~]# newaliases
WARNING: local host name (moonpoint) is not qualified; see cf/README: WHO AM I?
/etc/aliases: 360 aliases, longest 69 bytes, 6301 bytes total
[root@moonpoint ~]#

The referenced "cf/README" file is at /usr/share/sendmail-cf/README .

I had also noticed that when I entered the mailq command to see what messages were queued for transmission it took a long time to see the results. And whenever I sent email from the system with the email client Alpine, it was taking a long time for email messages to be transmitted.

[ More Info ]

[/network/email/sendmail] permanent link

Once You Know, You Newegg AliExpress by

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo