Thanks for the reply. I've included the <spoolmanager> element of my config as well as the thread manager element. Please let me know if there's anything else I need to include. As for the outgoing mail folder, I can stop the cron job from cleaning out the messages but how are messages that get stuck in /var/mail/outgoing processed? If a message has an invalid email or can't be send for some reason or another won't it remain in the outgoing folder until the retries timeout? Does not that compete with new messages that are valid and waiting to be sent? I just did a count of the messages in my spool and outgoing folders and this is what I see:
[EMAIL PROTECTED] find spool | wc -l 1381 [EMAIL PROTECTED] find outgoing | wc -l 2323 My <spoolmanager> and <thread-manager> elements are below. I've changed the emails, database login/passwords and the header names for privacy but everything else is exactly what I'm using in production. Oh yeah, I'm using James 2.2.0. <spoolmanager> <!-- Number of spool threads --> <threads> 50 </threads> <!-- Set the Java packages from which to load mailets and matchers --> <mailetpackages> <mailetpackage>org.apache.james.transport.mailets</mailetpackage> <mailetpackage>com.bolt.james.mailets</mailetpackage> <mailetpackage>com.bolt.james.mailets.automated</mailetpackage> <mailetpackage>com.bolt.james.mailets.bolt</mailetpackage> <mailetpackage>com.bolt.james.mailets.notes</mailetpackage> </mailetpackages> <matcherpackages> <matcherpackage>org.apache.james.transport.matchers</matcherpackage> </matcherpackages> <processor name="root"> <!-- Checks that the email Sender is associated with a valid domain. --> <!-- Useful for detecting and eliminating spam. --> <!-- For this block to function, the spam processor must be configured. --> <!-- <mailet match="SenderInFakeDomain=64.55.105.9,64.94.110.11,194.205.62.122,194.205.62.62,195.7.77.20,206.253.214.102,212.181.91.6,219.88.106.80,194.205.62.42,216.35.187.246,203.119.4.6" class="ToProcessor"> <processor> spam </processor> </mailet> --> <!-- Important check to avoid looping --> <mailet match="RelayLimit=30" class="Null"/> <!-- <mailet match="All" class="XMLVirtualUserTable"> <!- 1:1 mapping -> <mapping>[EMAIL PROTECTED]@mordor</mapping> <!- 1:n mapping -> <mapping>[EMAIL PROTECTED] [EMAIL PROTECTED];radigast;gandalf</mapping> <!- DSN mapping -> <mapping>[EMAIL PROTECTED]:550 Requested action not taken: no such user here</mapping> <!- regex based mapping -> <mapping>[EMAIL PROTECTED]:(.*)@osgilliath:[EMAIL PROTECTED] tirith</mapping> <!- both standard and regex mapping -> <mapping>[EMAIL PROTECTED]@mordor;regex:ring@(.*):ring@ ${1}</mapping> <!- conditional regex mapping example -> <mapping>[EMAIL PROTECTED]:(.*)[EMAIL PROTECTED]:${1}- [EMAIL PROTECTED]; regex:(.*)[EMAIL PROTECTED]:${1}- [EMAIL PROTECTED] </mapping> </mailet> --> <!-- White List: If you use block lists, you will probably want to check for known permitted senders. This is particularly true if you use more aggressive block lists, such as SPEWS, that are prone to block entire subnets without regard for non-spamming senders. --> <!-- People on this list agree to pay a penalty if they send spam --> <mailet match="InSpammerBlacklist=query.bondedsender.org" class="ToProcessor"> <processor> remotedelivery </processor> </mailet> <!-- End of White List --> <!-- Check for delivery from a known spam server --> <!-- This set of matchers/mailets redirect all emails from known --> <!-- black holes, open relays, and spam servers to the spam processor --> <!-- For this set to function properly, the spam processor must be configured. --> <mailet match="InSpammerBlacklist=dnsbl.njabl.org" class="ToProcessor"> <processor> spam </processor> <notice>550 Requested action not taken: rejected - see http://njabl.org/ </notice> </mailet> <mailet match="InSpammerBlacklist=relays.ordb.org" class="ToProcessor"> <processor> spam </processor> <notice>550 Requested action not taken: rejected - see http://www.ordb.org/ </notice> </mailet> <!-- Sample matching to kill a message (send to Null) --> <!-- <mailet match="[EMAIL PROTECTED]" class="Null"/> --> <mailet match="[EMAIL PROTECTED]" class="Null"/> <mailet match="HasHeader=X-Some-Header-1" class="ToProcessor"> <processor>bolt</processor> </mailet> <mailet match="HasHeader=X-Some-Header-2" class="ToProcessor"> <processor>bolt</processor> </mailet> <mailet match="All" class="ToProcessor"> <processor> remotedelivery </processor> </mailet> </processor> <processor name="bolt"> <mailet match="HasHeader=X-Some-Header-1" class="BoltNotesRedirect"> <static>false</static> <inline>unaltered</inline> <attachment>none</attachment> <passThrough>false</passThrough> <debug>false</debug> <driver>net.sourceforge.jtds.jdbc.Driver</driver> <url>jdbc:jtds:sqlserver://DBSERVER:6969/DB_NAME</url> <user>db_login</user> <password>db_password</password> <preparedStatement>select email from UserEmail where userId = (?)</preparedStatement> <headers>X-Some-Header-1</headers> </mailet> <mailet match="HasHeader=X-Some-Header-2" class="BoltAutomatedRedirect"> <static>false</static> <inline>unaltered</inline> <attachment>none</attachment> <passThrough>false</passThrough> <debug>false</debug> <headers>X-Some-Header-2,X-Some-Header-3</headers> </mailet> </processor> <processor name="remotedelivery"> <!-- This is an anti-relay matcher/mailet combination --> <!-- --> <!-- Emails sent from servers not in the network list are --> <!-- rejected as spam. This is one method of preventing your --> <!-- server from being used as an open relay. Make sure you understand --> <!-- how to prevent your server from becoming an open relay before --> <!-- changing this configuration. See also <authorizedAddresses> in SMTP Server --> <!-- --> <!-- This matcher/mailet combination must come after local delivery has --> <!-- been performed. Otherwise local users will not be able to receive --> <!-- email from senders not in this remote address list. --> <!-- --> <!-- If you are using this matcher/mailet you will probably want to --> <!-- update the configuration to include your own network/addresses. The --> <!-- matcher can be configured with a comma separated list of IP addresses --> <!-- wildcarded IP subnets, and wildcarded hostname subnets. -- > <!-- e.g. "RemoteAddrNotInNetwork=127.0.0.1, abc.de.*, 192.168.0.*" --> <!-- --> <!-- If you are using SMTP authentication then you can (and generally --> <!-- should) disable this matcher/mailet pair. --> <!-- Deleting as this is not needed. The definition below would mean mail from yahoo.com mail servers would not be able to get through. --> <!-- <mailet match="RemoteAddrNotInNetwork=127.0.0.1, bolt.com" class="ToProcessor"> <processor> relay-denied </processor> <notice>550 - Requested action not taken: relaying denied</notice> </mailet> --> <!-- Attempt remote delivery using the specified repository for the spool, --> <!-- using delay time to retry delivery and the maximum number of retries --> <mailet match="All" class="RemoteDelivery"> <outgoing> file://var/mail/outgoing/ </outgoing> <!-- alternative database repository example below --> <!-- <outgoing> db://maildb/spool/outgoing </outgoing> --> <!-- Delivery Schedule based upon RFC 2821, 4.5.4.1 --> <!-- 5 day retry period, with 4 attempts in the first hour, two more within the first 6 hours, and then every 6 hours for the rest of the period. --> <delayTime> 5 minutes </delayTime> <delayTime> 10 minutes </delayTime> <delayTime> 20 minutes </delayTime> <delayTime> 45 minutes </delayTime> <delayTime> 2 hours </delayTime> <delayTime> 3 hours </delayTime> <delayTime> 6 hours </delayTime> <maxRetries> 25 </maxRetries> <!-- The number of threads that should be trying to deliver outgoing messages --> <deliveryThreads> 100 </deliveryThreads> <!-- If false the message will not be sent to given server if any recipients fail --> <sendpartial>false</sendpartial> <!-- A single mail server to deliver all outgoing messages. --> <!-- This is useful if this server is a backup or failover machine, --> <!-- or if you want all messages to be routed through a particular mail server, --> <!-- regardless of the email addresses specified in the message --> <!-- --> <!-- The gateway element specifies the gateway SMTP server name. --> <!-- If your gateway mail server is listening on a port other than 25, --> <!-- you can set James to connect to it on that port using the gatewayPort --> <!-- element. --> <!-- Although normally multiple addresses are implemented through proper --> <!-- DNS configuration, the RemoteDelivery mail does allow specifying --> <!-- multiple gateway elements, each of which may also have a port --> <!-- e.g., mygateway:2525 --> <!-- the gatewayPort element is used as a default --> <!-- <gateway> otherserver.mydomain.com </gateway> <gatewayPort>25</gatewayPort> --> </mailet> </processor> <!-- The error processor is required. James may internally set emails to the --> <!-- error state. The error processor is generally invoked when there is an --> <!-- unexpected error either in the mailet chain or internal to James. --> <!-- --> <!-- By default configuration all email that generates an error in placed in --> <!-- an error repository. --> <processor name="error"> <!-- If you want to notify the sender their message generated an error, uncomment this --> <mailet match="All" class="Bounce"/> <!-- If you want to notify the postmaster that a message generated an error, uncomment this --> <!-- <mailet match="All" class="NotifyPostmaster"/> --> <!-- Logs any messages to the repository specified --> <!-- <mailet match="All" class="ToRepository">--> <!-- <repositoryPath> file://var/mail/error/</repositoryPath>--> <!-- An alternative database repository example follows. --> <!-- <repositoryPath> db://maildb/deadletter/error </repositoryPath> --> <!-- </mailet>--> <!-- Delete all error messages instead of spooling them into var/mail/error (Ricardo 1/14/2005) --> <mailet match="All" class="Null"/> </processor> <!-- Processor CONFIGURATION SAMPLE: spam is a sample custom processor for handling --> <!-- spam. --> <!-- You can either log these, bounce these, or just ignore them. --> <processor name="spam"> <!-- To destroy all messages, uncomment this matcher/mailet configuration --> <!-- <mailet match="All" class="Null"/> --> <!-- To notify the sender their message was marked as spam, uncomment this matcher/mailet configuration --> <!-- <mailet match="All" class="Bounce"/> --> <!-- To notify the postmaster that a message was marked as spam, uncomment this matcher/mailet configuration --> <!-- <mailet match="All" class="NotifyPostmaster"/> --> <!-- To log the message to a repository, this matcher/mailet configuration should be uncommented. --> <!-- This is the default configuration. --> <!-- <mailet match="All" class="ToRepository">--> <!-- <repositoryPath>file://var/mail/spam/</repositoryPath>-- > <!-- Changing the repositoryPath, as in this commented out example, will --> <!-- cause the mails to be stored in a database repository. --> <!-- Please note that only one repositoryPath element can be present for the mailet --> <!-- configuration. --> <!-- <repositoryPath> db://maildb/deadletter/spam </repositoryPath> --> <!-- </mailet>--> <!-- Delete all spam messages instead of spooling them into var/mail/spam (Ricardo 1/14/2005) --> <mailet match="All" class="Null"/> </processor> <!-- This processor handles messages that are for local domains, where the user is unknown --> <processor name="local-address-error"> <!-- To notify the sender the address was invalid, uncomment this matcher/mailet configuration --> <!-- The original message is not attached to keep the bounce processor from deliverying spam --> <mailet match="All" class="Bounce"> <attachment>none</attachment> </mailet> <!-- To notify the postmaster that a message had an invalid address, uncomment this matcher/mailet configuration --> <!-- <mailet match="All" class="NotifyPostmaster"/> --> <!-- <mailet match="All" class="ToRepository">--> <!-- <repositoryPath> file://var/mail/address- error/</repositoryPath>--> <!-- An alternative database repository example follows. --> <!-- <repositoryPath> db://maildb/deadletter/address-error </repositoryPath> --> <!-- </mailet>--> <!-- Delete all local-address-error messages instead of spooling them into var/mail (Ricardo 1/14/2005) --> <mailet match="All" class="Null"/> </processor> <!-- This processor handles messages that are for foreign domains, where relaying is denied --> <!-- As of James v2.2, this processor can be deprecated by using the <authorizedAddresses> tag in the SMTP Server, and rejecting the message in the protocol transaction. --> <processor name="relay-denied"> <!-- To notify the sender the address was invalid, uncomment this matcher/mailet configuration --> <!-- The original message is not attached to keep the bounce processor from deliverying spam --> <mailet match="All" class="Bounce"> <attachment>none</attachment> </mailet> <!-- To notify the postmaster that a relay request was denied, uncomment this matcher/mailet configuration --> <!-- <mailet match="All" class="NotifyPostmaster"/> --> <!-- <mailet match="All" class="ToRepository">--> <!-- <repositoryPath>file://var/mail/relay- denied/</repositoryPath>--> <!-- An alternative database repository example follows. --> <!-- <repositoryPath> db://maildb/deadletter/relay-denied </repositoryPath> --> <!-- </mailet>--> <!-- Delete all relay-denied messages instead of spooling them into var/mail/error (Ricardo 1/14/2005) --> <mailet match="All" class="Null"/> </processor> </spoolmanager> On Wed, 2005-03-30 at 18:52 +0200, [EMAIL PROTECTED] wrote: > > Could anyone out there that's using James in a production > > system give me an idea of what parameters they use for their > > config file? At any given time, our production applications > > send out approximately 5000 emails a day. Currently, our > > config file is set to have 100 outgoing threads and > > 75 spool threads. > > I've got similar threads and it spools 150000 mails per day. > Consider that outgoing spool is full of ready to be sent message but also > delayed message (message non deliverable at a given time and james retry a > number of times in 5 days). > You should never delete messages from outgoing spool. > Check the RemoteDelivery configuration and put a lower number on > "maxRetries". > > If you don't need high deliverability standards then you can use this > configuration: > <delayTime> 10 minutes </delayTime> > <delayTime> 60 minutes </delayTime> > <delayTime> 6 hours </delayTime> > <maxRetries> 8 </maxRetries> > > > The messages in the spool are getting > > processed just fine. However, the number of messages in the > > outgoing folder seems to grow each day. I've had to resort > > to writing a cron script that cleans out messages in this > > folder that are more than a few days old and the James > > process seems to steadily sit at 49% CPU utilization. Anyone > > have any examples of working numbers? > > Your numbers are working numbers. This 49% CPU and "outgoing folder seems to > grow each day" makes me think at a configuration error. > You should post your processors configuration. > > Stefano > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]