Solved

sendmail server

Posted on 2009-05-10
6
274 Views
Last Modified: 2013-12-17
Hi all,

My sendmail server (which acts as our mail gateway) has over 8000 emails in the queue and has already been greylisted....

How do i troubleshoot this? Obviously we have been blacklisted for spamming, how do I get off lists and how do I proceed.

Is flushing the queue the only solution? Id hate to do that due to all the legitimate mail that might be in the queue
0
Comment
Question by:Network_Padawan
  • 3
  • 3
6 Comments
 
LVL 1

Expert Comment

by:aa789
Comment Utility
As root, use:

/usr/lib/sendmail -bq

or, if you want to watch the action:

/usr/lib/sendmail -v -bq

However, since you want to clear the queue, and you know that many connections may be slow due to the greylist, you might want to issue many (10 - 20 depending on your cpu speed)

/usr/lib/sendmail -bq &

which will run the queue that many times

You may want to cd to the queue directory (usually /var/spool/mqueue) and grep the qf files ...

grep To: qf* | sort | more

And see which sites are making your queue fill up. Then you could (where foo.com is replaced by the site of interest)

grep foo.com qf* | cut -d: -f1 | sed "s/qf/*f/" >/tmp/qflist
rm `cat /tmp/qflist`

to delete those emails (assuming they're not important, of course). what this did was find the site name in the qf files, isolate the queue file name, and change the queue file name to a wildcard for the queue file name (there will be a qf<id>, df<id> and maybe xf<id> and others.




0
 

Author Comment

by:Network_Padawan
Comment Utility
Hey thanks.

when I type /usr/lib/sendmail -v -bq  I get:

Invalid operation mode q
0
 
LVL 1

Expert Comment

by:aa789
Comment Utility
Ooops ...

just

/usr/lib/sendmail -v -q

0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:Network_Padawan
Comment Utility
Thanks for your help.

Just quickly, so i understand, the sendmail -q processes the queue right? Is this a forced queue? Because I thought sendmail processes the queue automatically
0
 
LVL 1

Accepted Solution

by:
aa789 earned 500 total points
Comment Utility
Yes, this is forcing the queue.

Sendmail runs the queue automatically at a fixed interval. That's the argument to sendmail (example: -q1h, -q15m) which you see when you do a ps <args>  command (args depend on your system). In my case
ps -ef |grep sendmail
show it. But when your queue is overfull, the queue run doesn't finish within your queue interval, so it keeps getting more full. So we force multiple queue runs to get the queue processed.

0
 

Author Closing Comment

by:Network_Padawan
Comment Utility
Thankyou
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This short article will present "How to import ICS Calendar onto Office 365 Calendar". I was searching for free (or not free) tools to convert ICS to CSV without success. The only tools I found & working well were online tools...this was too hard to…
Utilizing an array to gracefully append to a list of EmailAddresses
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now