RE: Mail stuck in /var/spool/postfix/hold

"L.P.H. van Belle via MailScanner" <mailscanner-qhrM8SXbD5JTOyd/[email protected]>
Newsgroups gmane.mail.virus.mailscanner
Message-ID <vmime.60c9b13c.5fb7.2b2b70a430f01efc@ms249-lin-003.rotterdam.bazuin.nl>
Ah, on www-data, i use mailwatch with mailscanner. 

SpamAssassian in debian/ubuntu.
debian-spamd:x:113:120::/var/lib/spamassassin:/bin/sh

/usr/share/perl5/Mail/SpamAssassin/Plugin/Pyzor.pm

> -----Oorspronkelijk bericht-----
> Van: MailScanner 
> [mailto:mailscanner-bounces+belle=bazuin.nl-qhrM8SXbD5JTOyd/[email protected]
> info] Namens Remco Barendse
> Verzonden: woensdag 16 juni 2021 9:48
> Aan: L.P.H. van Belle via MailScanner
> Onderwerp: RE: Mail stuck in /var/spool/postfix/hold
> 
> Thanks!  I added postfix to group clamav, I do not use exim 
> nor www-data 
> therefore I don't think that adding these to mtagroup will fix it.
> 
> Is there any way of forcing MailScanner to show which file it 
> is failing 
> permissions on?
> 

Now this part.. There are cleary 2 things mixed up here. 
Spamassassin + pyzor from cpan.
/usr/local/share/perl/5.30.0/Mail/SpamAssassin/Plugin/Pyzor.pm 

My version. 
/usr/share/perl5/Mail/SpamAssassin/Plugin/Pyzor.pm

So, check and cleanup, use or local repo version or manual cpan version. 
Looks like there is bit of both now. 



I just noticed also these parts in my config. 
From /etc/MailScanner/spamassassin.conf 

# make sure pyzor is installed before enabling
ifplugin Mail::SpamAssassin::Plugin::Pyzor
        pyzor_path /usr/bin/pyzor
        pyzor_options --homedir /var/lib/MailScanner/
Endif

# you need to install DCCPROC and enable the plugin in v310.pre
# https://svn.apache.org/repos/asf/spamassassin/branches/3.0/INSTALL
# under "Optional Programs"
ifplugin Mail::SpamAssassin::Plugin::DCC
        dcc_path /usr/local/bin/dccproc
        dcc_home /var/lib/MailScanner/
Endif

And you can add debug manual here. 
spamassassin --lint --debug 

Greetz, 

Louis



> 
> I noticed that ms-config did install pyzor, doing
>   MailScanner -debug --lint
> reveals this :
> internal error, python traceback seen in response: Traceback 
> (most recent 
> call last):\n  File "/bin/pyzor", line 408, in <module>\n    main()\n 
> File "/bin/pyzor", line 131, in main\n    config, options, args = 
> load_configuration()\n  File "/bin/pyzor", line 107, in 
> load_configuration\n    
> os.mkdir(options.homedir)\nPermissionError: [Errno 
> 13] Permission denied: '/var/spool/postfix/.pyzor' at 
> /usr/local/share/perl/5.30.0/Mail/SpamAssassin/Plugin/Pyzor.pm
>  line 308.
> SpamAssassin reported no errors.
> 
> There is no such directory /var/spool/postfix/.pyzor the 
> installer didn't 
> create it.  Surprisingly, when installing SpamAssassin from apt on my 
> first attempt, it created a user spamd but ms-configure installed 
> spamass from cpan and it seems no user spamd was created ?
> 
> mkdir /var/spool/postfix/.pyzor
> chown postfix. /var/spool/postfix/.pyzor

I would do chown postfix:mtagroup /var/spool/postfix/.pyzor && chmod 770 /var/spool/postfix/.pyzor

> 
> silenced the error, i removed pyzor just in case though
> 
> razor was also installed by the MailScanner installer but no 
> directory created, guess ms-configure should have created that ?

I see if i can make the time  and run a quick setup on this. 


> 
> 
> Thanks for help :)
> 
> On Wed, 16 Jun 2021, L.P.H. van Belle via MailScanner wrote:
> 
> > Hmm.. This is my MTA group on debian.
> >
> > mtagroup:x:1001:clamav,Debian-exim,postfix,mail,www-data
> >
> > And this one :  /var/run/clamav/clamd.ctl
> > ( i dont have that one, all ip sockes here. )
> > clamav:x:119:postfix
> >
> >> SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin
> > That folder does not show up in you directory listing.
> > ( check here and hee.. Also not on my server )
> >
> > drwxrwx---  53 postfix mtagroup 4096 Jun 16 06:29 ramdisk_store
> > Only change in this one for you is the owner.. (root)..
> >
> > I cant fully compair, i also have a lot in SQL.
> >
> > I hope it helps you. At least you know its a permission somewhere.
> >
> > Greetz,
> >
> > Louis
> >
> >> -----Oorspronkelijk bericht-----
> >> Van: MailScanner
> >> [mailto:mailscanner-bounces+belle=bazuin.nl-qhrM8SXbD5JTOyd/[email protected]
> >> info] Namens Remco Barendse
> >> Verzonden: woensdag 16 juni 2021 0:01
> >> Aan: MailScanner Discussion
> >> Onderwerp: Re: Mail stuck in /var/spool/postfix/hold
> >>
> >>
> >>
> >> On Tue, 15 Jun 2021, Mark Sapiro wrote:
> >>
> >>> On 6/15/21 11:06 AM, Remco Barendse wrote:
> >>>>  Thanks!  I checked but didn't see any apparmor errors or
> >> anything that
> >>>>  relates to mail, only that MailScanner gets killed :
> >>>>
> >>>>  Jun 15 19:54:37 gw2 MailScanner: Process did not exit
> >> cleanly, returned 13
> >>>>  with signal 0
> >>>
> >>>
> >>> This is the relevant message. This (status 13) is a
> >> permissions error.
> >>
> >> OK :)  Getting somewhere
> >>
> >>
> >>> What are the MailScanner settings for Run As User and Run 
> As Group?
> >>
> >> My  /et/etc/MailScanner/conf.d/10_postfix.conf (MailScanner.conf is
> >> untouched except for "%org-name% =" :
> >>
> >> Run As User = postfix
> >> Run As Group = postfix
> >> Incoming Queue Dir = /var/spool/postfix/hold
> >> Outgoing Queue Dir = /var/spool/postfix/incoming
> >> MTA = postfix
> >> Clamd Socket = /var/run/clamav/clamd.ctl
> >> SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin
> >> Block Encrypted Messages = yes
> >> Convert Dangerous HTML To Text = yes
> >> Convert HTML To Text = %rules-dir%/html2text.rules
> >> Quarantine Whole Message = yes
> >> Quarantine Whole Messages As Queue Files = yes
> >> Always Include SpamAssassin Report = yes
> >> Sign Clean Messages = no
> >> #sign-incoming-messages.rules
> >> Remove These Headers = Disposition-Notification-To:
> >> Return-Receipt-To:
> >> X-Confirm-Reading-To: Disposition-Notification-To:
> >> Receipt-Requested-To:
> >> Confirm-Reading-To: MDRcpt-To: MDSend-Notifications-To: 
> Smtp-Rcpt-To:
> >> Return-Receipt-To: Read-Receipt-To: X-Confirm-Reading-To:
> >> X-Acknowledge-To: Delivery-Receipt-To: X-PMrqc: Errors-To:
> >> X-IMAPBase:
> >> X-IMAP X-UID: Status X-Status: X-UIDL: X-Keywords: 
> X-Mozilla-Status:
> >> X-Mozilla-Status2:
> >> Notify Senders = no
> >> Notify Senders Of Blocked Filenames Or Filetypes = no
> >> Disarmed Modify Subject = no
> >> Phishing Subject Text = {Phishing?}
> >> #Archive Mail = /var/spool/MailScanner/archive/_DATE_
> >> Archive Mail = %rules-dir%/archive.rules
> >> Send Notices = no
> >> Spam Checks = %rules-dir%/spam.check.rules
> >> Spam List = BARRACUDA SORBS SPAMHAUS SPAMCOP
> >> Spam Lists To Reach High Score = 1
> >> Max Spam Check Size = 2048k
> >> High SpamAssassin Score = 10
> >> Spam Actions = striphtml deliver header "X-Spam-Status: Yes"
> >> #High Scoring Spam Actions = striphtml deliver header
> >> "X-Spam-Status: Yes"
> >> High Scoring Spam Actions = store-spam
> >> MCP Checks = yes
> >> First Check = mcp
> >> High Scoring MCP Actions = store
> >> Is Definitely Not MCP = %rules-dir%/mcp.check.rules
> >> Include Scores In MCP Report = yes
> >> # End Of File
> >>
> >>
> >>> What does groups xxx  where xxx is the Run As User show?
> >>
> >> root@gw2:/etc/MailScanner# groups postfix
> >> postfix : postfix mtagroup
> >>
> >>
> >>> what does ls -l /var/spool/MailScanner show?
> >>
> >> ls -l /var/spool/MailScanner
> >> total 48
> >> drwxr-xr-x. 872 mail    mtagroup 32768 Jun 13 06:12 archive
> >> drwxrwx---   14 postfix mtagroup   320 Jun 15 20:42 incoming
> >> drwxrwxr-x    2 postfix mtagroup  4096 Jun 15 11:35 milterin
> >> drwxrwxr-x    2 postfix mtagroup  4096 Jun 15 11:35 milterout
> >> drwxrwxr-x    3 postfix postfix   4096 Jun 15 20:04 quarantine
> >> drwxrwx---    9 root    mtagroup  4096 Jun 15 19:52 ramdisk_store
> >>
> >>
> >>>
> >>>
> >>> --
> >>> Mark Sapiro <[email protected]>        The highway is for gamblers,
> >>> San Francisco Bay Area, California    better use your sense
> >> - B. Dylan
> >>>
> >>>
> >>> --
> >>> MailScanner mailing list
> >>> mailscanner-qhrM8SXbD5JTOyd/[email protected]
> >>> http://lists.mailscanner.info/mailman/listinfo/mailscanner
> >>>
> >>>
> >>
> >> --
> >> MailScanner mailing list
> >> mailscanner-qhrM8SXbD5JTOyd/[email protected]
> >> http://lists.mailscanner.info/mailman/listinfo/mailscanner
> >>
> >>
> >
> >
> >
> > -- 
> > MailScanner mailing list
> > mailscanner-qhrM8SXbD5JTOyd/[email protected]
> > http://lists.mailscanner.info/mailman/listinfo/mailscanner
> >
> >
> 
> -- 
> MailScanner mailing list
> mailscanner-qhrM8SXbD5JTOyd/[email protected]
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
> 
> 



-- 
MailScanner mailing list
mailscanner-qhrM8SXbD5JTOyd/[email protected]
http://lists.mailscanner.info/mailman/listinfo/mailscanner
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.