Hot answers tagged

17

Queued messages are stored in /var/spool/mqueue. So try this (I assume you want to get rid of all messages in the queue): Stop sendmail rm -rf /var/spool/mqueue/* (might be called mqueue-client on Ubuntu) Start sendmail


17

If you just want to know the number of messages sitting in the deferred queue, then the following should get you a quick answer: find /var/spool/postfix/deferred -type f | wc -l There are three other queues. See http://www.porcupine.org/postfix/queueing.html for details.


13

I tried this answer that addresses this very problem. But messages don't seem to be easily modifiable in the version I have (2.11.0). For instance there is no /var/spool/mqueue dir, but, instead, /var/spool/postfix/... I want to clarify two things. First, that answer was applied to sendmail NOT postfix. Second, direct-manipulating-raw-queue-files ...


12

That sounds normal. If you run multiple connections in parallel submitting mail, do you still get 90ms per mail? This will let you easily raise your rate that you can submit mail. I know that other MTAs (sendmail) will fsync() to ensure that the accepted mail is committed to disk before sending back the 250 response, so that email doesn't get dropped if the ...


8

You will often find the suggestion to remove files from Sendmail's mqueue directory with for instance rm /var/spool/mqueue/* or worse (rm -rf etc.). IMHO, this is plain dangerous. It will work in many cases but I recommend to fasten your seat belts. Simply removing all files from mqueue might delete legitimate messages. To stop Sendmail before removing ...


7

Look in /var/spool/mqueue. There are two files for each mail. dfblah for the email text, qfblah for the headers. You can ignore the df files and concentrate of the qf files. Depending on whether you need to modify just the envelope-from or the header-from as well, you might need to modify one or two locations. Save a copy before you start modifying ...


6

Postfix best practices say that you should do most of the filtering before the initial queue to avoid: wasting resources in messages you shouldn't accept in the first place; avoid sending error messages back (therefore spending the resources for the original email and the error message); avoiding sending error messages to wrong recipients. So, queuing ...


5

Here's a crazy idea, but why don't you go ahead and change the notification? What is sending out the error? Most monitoring systems allow you to specify the time span you want to be alerted during. I would work on it from that end, since disabling the mail daemon to stop a client from sending mail is backwards. Change that which has the least effect.


5

You could filter the output and display only the last line: mailq | tail -n 1


5

Ramdisk: Implications Using a ramdisk is only useful when your application is IO bound, specifically to your hard disk. Unless you are sending thousands of messages over a fast fiber link, chances are that your primary limiter is the speed of your internet connection, and not the speed of your hard drive. Exim is already very good at handling large queues ...


5

Try pfctl -s queue -v or pfctl -s queue -v -v for continuous output.


5

The problem doesn't lie in Postfix. Before you had Postfix installed, your application was directly submitting your mail to a distant SMTP Submission server, out across Internet. The step that you've missed is reconfiguring your application. It's still going out to the distant server. You need to tell your application, perhaps indirectly, to submit mail ...


5

You could have a job queuing system or modify the kernel's scheduling approach. I'm going to ignore those options and suggest that you use ionice -- or more specifically that Bob uses it to lower his priority. It sound like you're having a disk access issue rather than a memory issue. Regular nice may also be an option as it will indirectly affect disk ...


5

Bob read/writes large files (e.g. using gunzip). This can take up to 100% of the memory, intermittently, for hours. This is usually done overnight, but when running, will make even simple commands such as cd take 30s, opening emacs can take minutes. First gzip and gunzip do not work the way you think they do -- the algorithm used by gzip is block based, ...


5

You need the development files. I'd wager they're called zeromq-devel or something of that sort on RPM based distributions.


5

You might want to check out GNU parallel: GNU parallel is a shell tool for executing jobs in parallel using one or more computers. There are plenty of examples in the docs, including GNU Parallel as dir processor which you should probably have a look at. Of course you will need to do quite some scripting for this, and in the end you may even come to ...


4

Arman, the paradigm you are suggesting was the rigid time sharing model of mainframes. In the mainframe, one process would dominate the machine until it either completed or was suspended. As time progressed, people got tired of runaway jobs and kernels started butting in more frequently, putting processes on hold so that other processes could have a turn. ...


4

#!/bin/bash while ! postqueue -p | grep -q empty; do sleep 1 done killall wvdial


4

exim -Rf "mydomain.com" will be better


3

you didn't mention which email server you use, assuming you use postfix mailq >q.txt grep MAILER-DAEMON q.txt | sed 's/ .*//' | sed 's/^/postsuper -h /' > md.sh sh md.sh if you want you can put everything into one line, but if you have a lot of mails in your queue, this will take some time and putting the list into a file first saves you running the ...


3

Depends on your needs. The happy scenario works fine. What happens if you have 10 items in the Hudson queue and Hudson shuts down. The queue will be lost. Is this acceptable for you? If not, you have to implement a persistence layer. Are you now still better off with Hudson or should you use a product designed for queueing? These are just some questions ...


3

To avoid messing with cupsd.conf (and risking stompage), you can add users to the _lpadmin group: sudo dseditgroup -o edit -a fred _lpadmin or just add everyone: sudo dseditgroup -o edit -t group -a everyone _lpadmin BTW, membership in _lpadmin grants both the ability to manage queues, and also configure printer settings; if you just want to grant ...


3

The shell is perfect for that. Start the first program. Press Ctrl-z to suspend the program. Start the next program. Repeat steps 2 and 3 to add more programs to the queue. All the programs will be in Suspended mode. Now run the queue like this: while fg; do :; done You may not suspend this while loop or exit bash until the queue is done. If you will ...


3

exiqgrep -i -f [luser]@domain | xargs exim -Mrm


3

Sendmail transfers the mails to queue once they've been treated, so if sendmail is off they can't go to mqueue on time as you're experiencing. Check /var/spool/clientmqueue which is where sendmail stores the e-mails before forwarding them over, that should do the trick for you ;)


3

Alrighty then.... So I guess we figured out the problem. On further analysis, not ALL emails were being rejected. Emails were going through to the destination.domain.com, however only emails which were "Outlook Meeting Updates" were getting stuck in the queue. Armed with that piece of info I was able to google search and surprisingly get an instant hit here;...


3

If you have an idea of how old the oldest message is, you could do it with some grep and awk magic. I.e., if the oldest message is from Fri Jul 13, you could do this: postqueue -p |grep "Fri Jul 13"|head -5000 | awk '{print "postsuper -I", $1}'|sh to take the first 5000 messages found for that date. This doesn't do any sorting on which time during that ...


3

From the official docs: http://www.haproxy.org/download/1.7/doc/management.txt HAProxy supports a graceful and a hard stop. The hard stop is simple, when the SIGTERM signal is sent to the haproxy process, it immediately quits and all established connections are closed. The graceful stop is triggered when the SIGUSR1 signal is sent to the haproxy ...


2

This powershell command will do it. Get-ExchangeServer | ?{$_.IsHubTransportServer -eq $true} | Get-Queue | get-message | Remove-Message -withNDR $false



Only top voted, non community-wiki answers of a minimum length are eligible