The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lookin to Speed Up MailScanner ifor Outgoing Messages

Discussion in 'E-mail Discussions' started by lloyd_tennison, Sep 1, 2006.

  1. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    Lookin to Speed Up MailScanner for Outgoing Messages

    I am having a problem when sending mailing lists that MailScanner "hiccups" while someone is popping their mail or when it is restarting itself. The restarting I can change the time up on, but when someone is popping their mail the incoming (unprocessed) queue from mailman can just jump by 1500 to 4000 additional unprocessed messages in less than a minute. I already have the sending domains not being scanned when going out, but I can quickly get a queue of 50,000 which is then a problem.

    The problem seems to be the scanning of MailScanner when someone is popping. I will be converting all mailboxes to maildir, but I do not think that will be enough. Before MailScanner I did not have that problem, but I would like to keep MailScanner for some of its other features.
     
    #1 lloyd_tennison, Sep 1, 2006
    Last edited: Sep 1, 2006
  2. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    In case anyone else is looking, I found that if I change the port Mailman uses and add that port an an auxiliary port for exim_outgoing.conf - then MailScanner will not scan it as it is going directly into that queue.
     
  3. RickG

    RickG Well-Known Member

    Joined:
    Feb 28, 2005
    Messages:
    238
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    North Carolina
    That sounds like a neat trick.

    If using ConfigServer's MailScanner install, it should contain a ruleset file that overrides both mail and virus scan settings:

    /usr/mailscanner/etc/rules/scan.messages.rules

    The default file might contain:

    # Example: (scan all email)
    FromOrTo: default yes

    For mailing lists, I usually edit the file so it looks like the following (example only):

    From: list@domain.com no #bypass mailing list
    FromOrTo: default yes

    Scanning large outbound lists can bring things to a crawl. This makes a huge difference (on my server).
     
    #3 RickG, Oct 26, 2006
    Last edited: Oct 27, 2006
  4. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    That really does not make a huge difference, as even though it is not scanning the message it is processing it and moving it from one queue to another. The simple act of someone checking their email from IMAP with a lot of messages can bring MailScanner to a crawl and then I have hundreds of additional (or thousands) of messages that have to first be processed by MailScanner - as unprocessed - and then moved into the sending queue.

    My way actually bypasses the sending queue, and the recording by Mailwatch, and places them directly in the outgoing queue. There 80% or so are delivered immediately, whereas using the message scan rules I can end up with ten thousand or so messages waiting to be processed in 20 minutes. In two hours I had over a hundred thousand in the queue. This way I rarely have over 1500.
     
  5. RickG

    RickG Well-Known Member

    Joined:
    Feb 28, 2005
    Messages:
    238
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    North Carolina
    I hadn't thought about the issue of MailScanner moving the messages from one queue to another. In a much less active environment little things like adjusting rule-sets can have an impact (especially on entry level VPS').

    That said, can you go into more detail as to exactly where you change the port info? Sounds like a great solution and one I'd like to better understand. Thx -
     
  6. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    In the exim startup file, /etc/rc.d/init.d/exim

    I added:

    Code:
     fi
                    if [ ! "$ALTPORT" = "" ]; then
                            echo -n "Starting exim-$ALTPORT: "
                            TMPDIR=/tmp $DAEMONIZE /usr/sbin/exim -bd -oX $ALTPORT
                            TMPDIR=/tmp $DAEMONIZE /usr/sbin/exim -bd -C /etc/exim_outgoing.conf -oX 9999
                            echo $RESULT
    with the 9999 being the new port.

    Maybe someone has a better way, as exim might overwrite this file with an update.
     
Loading...

Share This Page