Global settings g_imap

  1. Home
  2. Knowledge Base
  3. Settings
  4. Global settings g_imap
  1. Home
  2. Knowledge Base
  3. IMAP
  4. Global settings g_imap

Table of Contents

g_imap_acl – Enable ACL (shared folders) in imap

This setting allows folders to be shared between users. See the domain setting ‘imap_public’. Requires surgemail 3.9d or later! For this to work you will need an imap client that supports ACL’s to create and map shared folders (.e.g. thunderbird)

Syntax: g_imap_acl bool

g_imap_auto_create – Create folders matching this list in response to ‘select’ commands

Some imap clients assume certain folders exist, this setting can be used to let surgemail auto create such folders when the imap client requests some action involving the folder

Syntax: g_imap_auto_create string

g_imap_auto_subscribe – Auto subscribe folders for users

This setting has no further documentation currently available

Syntax: g_imap_auto_subscribe bool

g_imap_blacklist – Test if imap users are in rbl’s and email admin

This lets you find any of your users who’s ip address has been blacklisted, at most it will email once a day, any additional entries are logged in mail.err log file (search for ‘blacklist’)

Syntax: g_imap_blacklist bool

g_imap_capa – Where to get the CAPABILITY value from

When you have suffix based domains and you’re using SurgeWall the CAPABILITY request comes before the domain of the user is known. As such SurgeMail cannot determine whether to send the real servers CAPABILITY or it’s own. This setting will choose the default behaviour, valid values are: Local, . By default SurgeMail defaults to the behaviour of the primary domain, if it’s surgewall then it obtains the real server capability. “Local” defaults to SurgeMails own capability, and defaults to the real server capability.

Syntax: g_imap_capa string

g_imap_capa_strip – Capability values to hide

In some situations you might not want to advertise server capabilities, for example SURGEMAIL and XFLDDATA when they cause problems with SurgeWall operations. Or perhaps the IDLE capability. Specifying the capability strings to hide here will cause SurgeMail to stop advertising those capabilies.

Syntax: g_imap_capa_strip string

g_imap_cram_enable – Enable CRAM-MD5 authentication (requires nwauth 4.0h or greater)

Please note that CRAM-MD5 does have security implications, specifically it means that the local users password must be stored in a semi reversable state in the authent database. Also you must be using the new version of the NWAuth module.

Syntax: g_imap_cram_enable bool

g_imap_debug – For NetWin use only

This setting has no further documentation currently available

Syntax: g_imap_debug bool

g_imap_delay – Glob data into bigger packets, never use this

This setting has no further documentation currently available

Syntax: g_imap_delay bool

This setting has no further documentation currently available

Syntax: g_imap_expunge_close bool

g_imap_folder – Type can be: Trash,Junk,Sent,Drafts,Archive

Helps email clients all use the same folder names, Valid types include: Trash,Flagged,AllMail,Junk,Important,Sent,Drafts, note these names have no meaning on the server, in particular AllMail is not actually all mail.

Syntax: g_imap_folder name=string type=string

g_imap_friends – Make the friends_pending folder visible in imap

Setting to map the friends_pending folder into an imap folder. There is no corresponding setting for the ‘held’ folder as we believe people should always use the friends mechanism as it is a superset of the held folder in functionality

Syntax: g_imap_friends bool

g_imap_idle_free – Releases threads in ‘idle’ state

This setting has no further documentation currently available

Syntax: g_imap_idle_free bool

g_imap_idle_nsf – The number of seconds before a complete directory rescan. To be used on NFS network drives

Number of seconds for IMAP IDLE to do directory rescan – , note setting is miss spelled, do not correct it!

Syntax: g_imap_idle_nsf int

g_imap_inactive_free – Releases threads not active

This setting has no further documentation currently available

Syntax: g_imap_inactive_free bool

g_imap_log_body – Log imap fetch body commands to msg*.rec log files

This only logs when a body or body part is read via imap

Syntax: g_imap_log_body bool

g_imap_log_copy – Log imap copy commands to msg*.rec log files

This setting has no further documentation currently available

Syntax: g_imap_log_copy bool

g_imap_log_flush – IMAP log flush

Flush IMAP log on every write (for debugging).

Syntax: g_imap_log_flush bool

g_imap_log_header – Log imap fetch header commands to msg*.rec log files (not usually needed)

This logs rather a lot so may create excessive logging. Probably the log body setting is more wise.

Syntax: g_imap_log_header bool

This setting has no further documentation currently available

Syntax: g_imap_log_main bool

g_imap_log_protocol – Log IMAP protocol

Log IMAP protocol and other IMAP information to the mail.log file.

Syntax: g_imap_log_protocol bool

g_imap_log_size – Size of imap.log file

This sets the imap.log file size, default is 2mb

Syntax: g_imap_log_size int

g_imap_max_messages – The number of messages in a single imap folder, default 200000

This setting helps limit impact when a user has a large folder, it will fail to load a folder larger than this and report errors in the log, it does not prevent the folder from having messages added to it, and it does not inform the user that the problem has occurred, this setting is primarily to limit impact of a crazy user :-), see also G_MAILDIR_MAX

Syntax: g_imap_max_messages int

g_imap_maxdup – Max duplicate imap fetch commands before we throttle connection, default 500

This setting has no further documentation currently available

Syntax: g_imap_maxdup int

g_imap_move – IMAP move extension

This setting has no further documentation currently available

Syntax: g_imap_move bool

g_imap_no_internal_date – Disable the internal date output on IMAP commands

The RFC implementation of internal dateis broken wiht MS outlook. SurgeMail has been modified to conform to the outlook inplementation of internal date making this setting redundant..

Syntax: g_imap_no_internal_date bool

g_imap_old – Revert to old imap module

Replace normal imap with old imap module, not recommended/supported

Syntax: g_imap_old bool

g_imap_old_ip – Revert to old imap module for some ip’s

Replace normal imap with old imap module, not recommended/supported

Syntax: g_imap_old_ip string

g_imap_pop_burst – Always burst using imap code

Prevents redownloading messages if file indicating user is using imap is lost. Generally this setting is not needed and should not be used. Turning it on/off will result in users getting duplicate messagese if they are using POP and have leave on server ticked

Syntax: g_imap_pop_burst bool

g_imap_port – IMAP Port (default 143)

Specifies the PORT to listen for IMAP connections on. IMAP is an alternative to POP protocol where the messages and folders all exist on the server. This is ideal when sharing a mail account between several users or when using Email from more than one computer.  Use the keyword ‘disabled’ to disable this part of the surgemail service.

Syntax: g_imap_port int

g_imap_search_body – Build and use indexes for imap body searching

This setting has no further documentation currently available

Syntax: g_imap_search_body bool

g_imap_search_index – Build and use indexes for imap header searching

This setting has no further documentation currently available

Syntax: g_imap_search_index bool

g_imap_search_noattach – Skip non text attachments when searching

This setting has no further documentation currently available

Syntax: g_imap_search_noattach bool

g_imap_search_text – Use only body and header indexes, fast but won’t get all matches

This setting has no further documentation currently available

Syntax: g_imap_search_text bool

g_imap_search_timeout – Limit on imap search, default is 180 seconds

This setting has no further documentation currently available

Syntax: g_imap_search_timeout int

g_imap_secure_port – IMAP Port (default 993)

Specifies the PORT to listen for dedicated SSL IMAP connections.

Syntax: g_imap_secure_port int

g_imap_size_fetch – If true, will display message sizes on fetch command. (ie * 123 EXISTS)

Displays message size in IMAP responses

Syntax: g_imap_size_fetch bool

g_imap_spam_train – Train if moving message to ‘spam’ folder, or from ‘spam’ folder to inbox

This setting has no further documentation currently available

Syntax: g_imap_spam_train bool

g_imap_status_cache – Cache imap status responses (Obsolete, use _stored setting)

Improves performance/reduces disk IO for imap

Syntax: g_imap_status_cache bool

g_imap_status_stored – Keep imap folder counts stored on disk

Improves performance/reduces disk IO for imap

Syntax: g_imap_status_stored bool

g_imap_sync_all – Apply imap_max_sync to all folders

This setting has no further documentation currently available

Syntax: g_imap_sync_all bool

g_imap_sync_nomax – Exception to imap_max_sync setting

This setting has no further documentation currently available

Syntax: g_imap_sync_nomax string

g_imap_testing – Test imap module instead of normal one (not functional)

Replace normal imap with a test one, this is not functional, do not use this setting.

Syntax: g_imap_testing bool

g_imap_throttle – Limit for sustained imap commands per second before warning admin, default is 5

Useful for detecting an email client in a loop wasting your resources

Syntax: g_imap_throttle int

g_imap_throttle_exclude – Users who are not limited

This setting has no further documentation currently available

Syntax: g_imap_throttle_exclude string

g_imap_throttle_limit – Daily mb download limit before applying throttle speed, e.g. 500

This setting has no further documentation currently available

Syntax: g_imap_throttle_limit int

g_imap_throttle_speed – Limit to this speed in bytes per second when throttling, e.g. 50k

This setting has no further documentation currently available

Syntax: g_imap_throttle_speed int

g_imap_timeout – Time, in minutes for imap timeout, RFC required default is 30

You may in some cases wish to reduce this below the RFC required default if your server is under very heavy load. Results may be unexpected when breaking RFC behavior!

Syntax: g_imap_timeout int

g_imap_timeout_login – Timeout prior to login in seconds

You may in some cases wish to reduce this below the RFC required default if your server is under very heavy load. Results may be unexpected when breaking RFC behavior!

Syntax: g_imap_timeout_login int

g_imap_timezone – Timezone to display – for testing purposes only

as per title 🙂

Syntax: g_imap_timezone string

g_imap_trash_nocopy – Prevent copying from Trash to Trash folder

This setting has no further documentation currently available

Syntax: g_imap_trash_nocopy bool

g_imap_uidl_nofix – Disable UIDL auto repair of duplicate entries

If true disable auto repair of identical UIDL entries.

Syntax: g_imap_uidl_nofix bool

g_imap_unsub_auto – Unsubscribe if a folder doesn’t exist

Helps dumb email clients that get confused

Syntax: g_imap_unsub_auto bool

g_imap_user_flags – This setting may confuse some email clients (mac) use with cautioun

This may confused some email clients if multiple clients are used on a single account as the user flags can conflict

Syntax: g_imap_user_flags bool

g_imap_warn_big – Warn user if inbox or sent has more than this many messages

We recommend setting this at about 10000, users should use the auto cleanup features (via user.cgi) to archive older messages to another folder

Syntax: g_imap_warn_big int

Was this article helpful?

Related Articles