1. Home
  2. Knowledge Base
  3. Global settings sending mail

Global settings sending mail

Table of Contents

g_retry_bounces – Max hours to keep trying to bounce messages

Max hours to keep trying to deliver a bounce the default is 48hrs

Syntax: g_retry_bounces int

g_retry_dns – Hours to keep trying if dns response suggested invalid domain name, default 0

By default, if the DNS server says a domain doesn’t exist, the message is immediately bounced so the sending user can take action. In some rare cases this will occur with a valid domain name because the actual DNS of the domain you are sending to is temporarily down. In this situation making SurgeMail retry for 1 hour can prevent these false bounces. I don’t recommend this setting as mostly the DNS response and cache etc is very very reliable because SurgeMail keeps a local cache of DNS lookups that worked on disk. So for a failure like this to occur it must be the first time the server has EVER looked up the domain, so the odds are extremely remote. Delaying a useful response to the user for 1 hour just for this remote chance is not wise in my opinion.

Syntax: g_retry_dns int

Example: g_retry_dns “1”

g_retry_from – Time to keep messages from these domains

This setting has no further documentation currently available

Syntax: g_retry_from domain=string hours=string

g_retry_limit – Max hours to keep trying to deliver messages

Every hour the mail server will attempt to deliver any messages that fail for a reason that may be a temporary fault (for example the destination mail server doesn’t respond). This setting limits how long these retries continue for. The default is 48 hours (2 days). 

Syntax: g_retry_limit int

g_retry_minutes – Time between attempted retries

Time in minutes that SurgeMail will try and resend a message that has failed to be delivered.
(default = 60 minutes).

Syntax: g_retry_minutes int

g_retry_rule – Retry rules overriding g_retry_limit

Rules that allow you to specify the retry_limit in hours on a per destination domain basis.

g_retry_rule domain=”test.com” hours=”48″

That will make it keep retrying to send to the domain test.com for 48 hours.

Syntax: g_retry_rule domain=string hours=string

g_retry_unwarn – Send user sent on confirmation if warning sent

This complements the warning setting, so the user can see the message did eventually go through and after how long…

Syntax: g_retry_unwarn bool

g_retry_warn – Send user a warning if first send fails

I like this setting myself but it can confuse users as the first send attempt will often fail and the user will mis read the bounce and think it’s failed completely. It does mean when a message is urgent the user gets told right away, instead of 2 days later, that there is a problem sending the message so for a business it’s a nice setting to enable.

Syntax: g_retry_warn bool

g_retry_warn_n – Send user a warning if nth send fails

Similar to the above setting but this one reduces the false warnings as messasges often fail on the first attempt

Syntax: g_retry_warn_n int

g_send_backoff – Backoff slow hosts

Seconds to leave slow responding host alone (default 900).

Syntax: g_send_backoff int

g_send_body_end_retry – Try again if connection fails after entire body sent

This setting will tend to result in ‘duplicate’ messages being received, so should not be used, but strictly speaking it is valid to retry in this situation, the trouble is the receiving mail server ‘may’ have a real copy of the message so may deliver it even though the connection was dropped.

Syntax: g_send_body_end_retry bool

g_send_body_noretry – Don’t try and resend if failure during body send

By default SurgeMail retries to send messages if the tcp connection is lost during the body send part of sending an email message. In rare situations this may cause problems, for example while sending a large file if the receiving software is faulty and is dieing rather than responding with ‘don’t try again’ error code. This behaviour was reversed before version 2.0h (e.g. it never retried)

Syntax: g_send_body_noretry bool

g_send_body_once – Don’t try 3 times if failure occurs sending body

This setting disables the new feature where the server tries harder to deliver a message even if it ‘might’ result in duplicates being delivered.

Syntax: g_send_body_once bool

g_send_bug1 – Fail while sending messages

Debugging feature.

Syntax: g_send_bug1 bool

g_send_conspeed – Outgoing connections per second per destination, default is 4

This helps prevent surgemail exceed tarpit throttles common in unix mail servers, adjust at your own risk. This won’t generally limit outgoing email speed so you don’t need to touch it. A value of ‘1’ means surgemail can make one connection each second.

Syntax: g_send_conspeed int

g_send_delay – Wait this many seconds after sending each item.

This is a simple throttle to limit sending speed to any single domain, a value of 2 seconds is probably reasonable. In general you would also set G_SEND_MAX_PERDOM to 1.

Syntax: g_send_delay int

g_send_first_retry – Minutes for first retry, default is 16 minutes, do not adjust!

It’s best not to change this generally, if you set it too low then grey listing may fail, if you set it higher then email is delayed.

Syntax: g_send_first_retry int

g_send_helo – Domain to use for all outgoing SMTP helo commands

Fully qualified domain to use for all outgoing SMTP helo commands.

Syntax: g_send_helo string

g_send_helo_from – Use the sending domain for the helo command

If the senders domain name (in return path envelope) is a valid local domain, then it is used in the ‘helo’ command.

Not generally recommended. The correct use of the helo is to identify the sending machine, not the domain, so although this makes the headers look pretty it doesn’t make them more correct in my opinion.

Syntax: g_send_helo_from bool

g_send_helo_in – Lookup dns name of incoming ip connection on local interface

So this is the local ip name it looks up not the remote ip address name.

Syntax: g_send_helo_in bool

g_send_lines – Send single line packets

Send messages in single line packets, slow! (for debugging)

Syntax: g_send_lines bool

g_send_lowpriority – Ip address of bulk sending servers

This limits the impact from mailing lists that would otherwise clogg the server and prevent normal individual emails going through quickly, typically set to *bounce@* to lower mailing list priority

Syntax: g_send_lowpriority string

g_send_max – Max concurrent sending sessions

Maximum concurrent outgoing SMTP connections . You should not have to change this. The default is 100.

Syntax: g_send_max int

g_send_max_perchan – Msgs to send on one open channel

This may help delivery if a server is incorrectly identifying your server as a spam source. A value of 1-5 would be reasonable

Syntax: g_send_max_perchan int

g_send_max_perdom – Max concurrent sending sessions to a single domain

Maximum concurrent outgoing SMTP connections to a single domain. The default is 2. This can be set higher and the default used to be 6 however there are a few servers out there that don’t like more than 2 channels being opened to them.

Syntax: g_send_max_perdom int

g_send_max_rcpt – How many rcpt’s to send per message when sending

Default is unlimited, Setting this to a small value like 10 may help some mail servers.

Syntax: g_send_max_rcpt int

g_send_no_domain – Message to show when domain points to us but can’t find user or domain

Most useful when using g_authent_always, as this error will be shown to local users when sending to local users that don’t exist.

Syntax: g_send_no_domain string

g_send_nolimit – Don’t apply g_max_perdom limit when sending to this domain

Use this on incomng mx severs for the local domain so it can use lots of channels to send the data through.

Syntax: g_send_nolimit string

g_send_nopoll – Use sleep loop instead of poll (debugging only)

This is to try and find an elusive fault on some systems sending large emails, not for general use

Syntax: g_send_nopoll bool

g_send_nosize – Don’t send size with from envelope

Revert to old style sending, no known reason for doing this

Syntax: g_send_nosize bool

g_send_noskipslow – Don’t skip slow hosts

Normally surgemail remembers hosts that are slow to open, fail and doesn’t retry for 60 minutes.

Syntax: g_send_noskipslow bool

g_send_onpopfetch – Only send outgoing while doing a POPfetch

Only send outgoing while doing a POPfetch (For dialup use).

Syntax: g_send_onpopfetch bool

Timeout, in seconds when opening an SMTP link.

Syntax: g_send_open_timeout int

g_send_retry_550 – Retry on 550 responses (general failure)

Might be useful to stop messages bouncing when destination server is temporarily rejecting everything

Syntax: g_send_retry_550 bool

g_send_retry_552 – Retry on 552 responses (typically quota exceeded)

Some faulty hosts return a 552 error when a user is over quota, this means that by the RFC SurgeMail must not try again to deliver the message. However this is clearly not a permanent error and so it’s often wise to retry in this situation, This setting makes SurgeMail attempt retries when faced with this odd response.

Syntax: g_send_retry_552 bool

g_send_rewrite – Rewrite envelope recipient at send stage, does not change destination server

This rewrites the recipient envelope, you can use wild cards, e.g. *@this.domain %1@another.domain, to rewrite ‘from’ addresses use g_from_rewrite

Syntax: g_send_rewrite was=string to=string

g_send_speed – max outbound bandwidth

Bytes per second to limit each outgoing channel to. eg: 10k

Syntax: g_send_speed int

g_send_sslheader – Add x-encrypted header when sending via ssl

This setting has no further documentation currently available

Syntax: g_send_sslheader bool

g_send_store_disable – Disable sendstore smtp extenstion

This setting disables the ability to save the message to the sent folder as part of the smtp command (only used by SurgeAlert)

Syntax: g_send_store_disable bool

g_send_strip – Headers to strip when sending

This setting has no further documentation currently available

Syntax: g_send_strip string

g_send_timeout – Send timeout

Timeout, in seconds when sending mail, default is 540 (9 minutes)

Syntax: g_send_timeout int

g_send_tolimit – Limit speed to send to one or more domains.

Some large providers will assume you are a spammer if you send too many messagse in an hour. If you have a large mailing list it’s easy to break these limits, in which case some rules like this can prevent this problem.

Syntax: g_send_tolimit domain=string perhour=int

Example: g_send_tolimit domain=”hotmail.com,*hotmail.com” perhour=”60″

g_sent_archive – Archive old messages to Archives/yyyy/Sent folder, age in days

Trigger with tellmail mail_rules (or it will run once a week)

Syntax: g_sent_archive int

g_sent_nodup – Drop duplicates in Sent folder due to sent_store

This setting has no further documentation currently available

Syntax: g_sent_nodup bool

g_sent_store – Store all sent messages in IMAP folder if smtp authenticated

If user is authenticated then store message in a folder, note that duplicates may occur if the client is also doing this (disable in the client) or use a name like System_Sent to avoid confusion

Syntax: g_sent_store string

Was this article helpful?


Need Support?

Can't find the answer you're looking for?
Contact Support