Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 28th October 2008, 17:10
glazebrook glazebrook is offline
Junior Member
 
Join Date: Oct 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default The Perfect SpamSnake - Ubuntu 8.04 LTS - Emails stuck in postfix queue

I was hoping you may be able to help me with regards to the above how to article. I followed the how to with no problems and the server has been running fine. Now for some reason all emails stay in /var/spool/postfix/hold directory.
The only error i seem to get is in /var/log/user.log

MailScanner: Process did not exit cleanly, returned 255 with signal 0

If i run MailScanner --lint it passes on everything.

Any help would be very much appreciated.
Reply With Quote
Sponsored Links
  #2  
Old 29th October 2008, 12:40
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Hey,

Try running in debug mode, it should give a better error message.
From the wiki
http://wiki.mailscanner.info/doku.ph...ot:mailscanner

How to use MailScanner’s debug mode effectively:

* Shutdown MailScanner and your MTA
* Start only your incoming MTA. This is usually done by the command
|service MailScanner startin| on Redhat. Other distros/OS may vary
* Set “Debug = yes” and “Debug SpamAssassin = yes” in
MailScanner.conf, then run ‘check_MailScanner’.
* Watch carefully the output for error messages and fix what you can
fix.
* Restore the debug options back to no
* Restart MailScanner

Rocky
__________________
Home of the SpamSnake
Reply With Quote
  #3  
Old 29th October 2008, 18:22
glazebrook glazebrook is offline
Junior Member
 
Join Date: Oct 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default One step closer

Hi Rocky

Thanks for your reply.

How do i run the following check_MailScanner on ubuntu .When i run it i just get command not found.

Also i have narrowed the problem down to the fact that the emails only stay in the queue when there is an email with a zip file attachment. As soon as i remove the email from the queue the rest of the emails are delivered.

Any ideas?

Thanks again
Ben
Reply With Quote
  #4  
Old 14th November 2008, 13:30
glazebrook glazebrook is offline
Junior Member
 
Join Date: Oct 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Emails are no longer getting stuck in the queue

Ok i have tracked down the problem.

Mailscanner was basically getting stuck in a loop when it received a .docx or .zip file.

By changing the following setting within mailscanner.conf

Maximum Archive Depth = 2 to Maximum Archive Depth = 5

Emails are no longer getting stuck in the queue.
Reply With Quote
  #5  
Old 14th November 2008, 14:29
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Hey,

It's weird that you had to set that option to 5, because mine is set to 2 and it's been working fine. But I'm happy you got it resolved and that's for the update.

Rocky
__________________
Home of the SpamSnake
Reply With Quote
  #6  
Old 19th November 2008, 02:35
teixeira teixeira is offline
Junior Member
 
Join Date: Jan 2008
Location: Leiria - Portugal
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey,

I'm having the same problem here.
I'm testing sending attachments to check if newly added filetypes were ok, i sent 3 emails with and wmv, mpg anf pps files separately and since 1 hr that e have a couple mails stucked in the quere.

As glazebrook, said MailScanner is reporting the same error in user.log and is in loop trying to process the messages.

I also changed the Maximum Archive Depth to 5 and did a MailScanner restart but no luck.

Regards,
Teixeira
Reply With Quote
  #7  
Old 19th November 2008, 03:22
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Are those filetypes allowed in your filetype rules file?
__________________
Home of the SpamSnake
Reply With Quote
  #8  
Old 19th November 2008, 03:30
teixeira teixeira is offline
Junior Member
 
Join Date: Jan 2008
Location: Leiria - Portugal
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nope. They're blocked.
The idea was to test if they were passing or not.

I already deleted all /var/spool/postfix/hold files that were on the queue and restarted postfix and mailscanner but new mails still coming and stuck in the queue.

if helps, here is my current maillog:
Code:
Nov 19 02:31:18 scx MailScanner[6582]: MailScanner E-Mail Virus Scanner version 4.68.8 starting...
Nov 19 02:31:18 scx MailScanner[6582]: Read 817 hostnames from the phishing whitelist
Nov 19 02:31:18 scx MailScanner[6582]: Read 5141 hostnames from the phishing blacklist
Nov 19 02:31:19 scx MailScanner[6582]: Config: calling custom init function SQLBlacklist
Nov 19 02:31:19 scx MailScanner[6582]: Starting up SQL Blacklist
Nov 19 02:31:19 scx MailScanner[6582]: Read 0 blacklist entries
Nov 19 02:31:19 scx MailScanner[6582]: Config: calling custom init function MailWatchLogging
Nov 19 02:31:20 scx MailScanner[6582]: Started SQL Logging child
Nov 19 02:31:20 scx MailScanner[6582]: Config: calling custom init function SQLWhitelist
Nov 19 02:31:20 scx MailScanner[6582]: Starting up SQL Whitelist
Nov 19 02:31:20 scx MailScanner[6582]: Read 1 whitelist entries
Nov 19 02:31:21 scx MailScanner[6582]: SpamAssassin temporary working directory is /var/spool/MailScanner/incoming/SpamAssassin-Temp
Nov 19 02:31:21 scx MailScanner[6582]: Using SpamAssassin results cache
Nov 19 02:31:21 scx MailScanner[6582]: Connected to SpamAssassin cache database
Nov 19 02:31:22 scx MailScanner[6582]: Enabling SpamAssassin auto-whitelist functionality...
Nov 19 02:31:24 scx MailScanner[6582]: ClamAV scanner using unrar command /usr/bin/unrar
Nov 19 02:31:24 scx MailScanner[6582]: Using locktype = flock
Nov 19 02:31:24 scx MailScanner[6582]: New Batch: Scanning 2 messages, 5384 bytes
Nov 19 02:31:25 scx MailScanner[6582]: SpamAssassin cache hit for message 5AC63148066.E8316
Nov 19 02:31:25 scx MailScanner[6582]: SpamAssassin cache hit for message D019714805A.00BA8
Nov 19 02:31:25 scx MailScanner[6582]: Spam Checks: Found 2 spam messages
Nov 19 02:31:25 scx MailScanner[6582]: writing to /var/spool/MailScanner/quarantine/20081119/spam/5AC63148066.E8316: No such file or directory
Remark: I commented out all the filtypes i implemented before it happened to start from the beginnig.

Regards,
Teixeira

Last edited by teixeira; 19th November 2008 at 03:33.
Reply With Quote
  #9  
Old 19th November 2008, 03:40
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Please resend a mail with the problem attachment and post your log here for me to take a look at.
__________________
Home of the SpamSnake
Reply With Quote
  #10  
Old 19th November 2008, 03:44
teixeira teixeira is offline
Junior Member
 
Join Date: Jan 2008
Location: Leiria - Portugal
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Hi,

I looked better in to the mail.log and the message

What happened? Well i remember to send those 3 kinda big email ( summed maybe 12MB all 3) at about 23:50 (18 Nov) i went drink a coffe when arrived (19 Nov) i noticed the emails hadn't been delivered.... i did the steps above...and now i made this:

Code:
root@scx:~# mkdir -p /var/spool/MailScanner/quarantine/20081119/spam
root@scx:~# chown -R postfix:www-data /var/spool/MailScanner/quarantine/20081119
I forced that 2 directories criation and new stucked emails just were delivered sucessfully.


Could MailScanner for any reason not checking everytime it has to write in /var/spool/MailScanner/quarantine/year_month_day/spam directory if this exists or not generates the mail.log error and mail stuck in queue?


Anyways, looks running ok now. But i've to to do some more tests like these i made today with and check if happens again.


Thanks.

Regards,
Teixeira
Reply With Quote
Reply

Bookmarks

Tags
stuck emails

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
localhost postfix/master: fatal: bind 127.0.0.1 port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 17:39
Mailscanner problem on The Perfect SpamSnake - Ubuntu 8.04 LTS brownr26 HOWTO-Related Questions 3 20th August 2008 16:05
SpamSnake SpamAssassin not working? getrav HOWTO-Related Questions 5 23rd June 2008 23:02
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36


All times are GMT +2. The time now is 13:48.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.