The configuration file selor.conf
The configuration file stay by default at /usr/local/selor/selor.conf. All names of options is Case Sensitive.
For any change made in selor.conf have effect you must restart Selor Daemon.
/etc/rc.d/rc.selor restart
Port - To indicate the port that server will listen. If you want a email server to listen multiple ports, you can do a Firewall redirection in your operating system or create another configuration file (selor2.conf) with 'Port' option appointed to other port and initiate the Selor with '-c' option. Example: selor -c /usr/local/selor/selor_587.conf
Inside of this new file you must to specify a new port (Port) and another pid file (Pid_file).
Type: Numeric Default: 25 Examples: Port 25 Port 587
Server_name - To Indicate the server name. You must to use the same name of its IP reverse name.
Type: Text Default: "localhost" Examples: Server_name "localhost" Server_name "mx1.nomedoservidor.com.br"
Sid - With this option you can specify a internal identification for your Selor server in an environment with multiples MTAs sharing a same directory spool
Type: Text Default: "" Examples: Sid "sv1" Sid "mx4"
User - Option to specify a user owner that your Selor server will run
Type: Text Default: "selor" Examples: User "selor" User "root"
Group - Option to specify a group owner that your Selor server waill run.
Type: Text Default: "selor" Examples: Group "selor" Group "root"
Limit_buf - Defines the length buffer for the anti DoS system. Each position on the buffer is a slot that controls one conection, in other words, if you define a buffer with length 100, your server will analyze the last 100 connections to seek a DoS attack. To disable this system you must to set this option to 0.
Type: Numeric Default: 0 (Disabled) Examples: Limit_buf 50 Limit_buf 100 Limit_buf 150
Limit_cnx - Defines the maximum connections allowed coming from the one IP in a period defined by Limit_time. If a IP makes '<Limit_cnx>' connections and the time between each connection is less than the time specified by Limit_time, this connection will considered a possible DoS attack and Event.Limit is called and you can do what you want: Close Connection, Log, Create a rule in your Firewall to block this IP, etc.
Type: Numeric Default: 15 Examples: Limit_cnx 20 Limit_cnx 30
... and in a time of despair: Limit_cnx 5
Limit_time - Defines the acceptable time between each connection for the same IP. This option is activated only when Limit_buffer has a value larger than 0
Type: Numeric Default: 1 Examples: Limit_time 1 Limit_time 2
Event.limit - Defines a rule or rules file to be executed when a possible DoS attack is detected. To enable this DoS prevention system you must to specify a value for Limit_buf option. A good value for Limit_buf is 100.
Type: Text Default: "" Examples: Event.Limit "/usr/local/selor/limit_rules"
Event.connection - Defines a rule or rules file to be executed when a host connect in your Selor server.
Type: Text Default: "" Examples: Event.connection "/usr/local/selor/connection_rules"
Event.helo - Defines a rule or rules file to be executed when the connected host send the SMTP helo/ehlo identification command.
Type: Text Default: "" Examples: Event.helo "/usr/local/selor/helo_rules"
Event.auth (Selor >= 1.5)- Defines a rule or rules file to be executed when the connected host send the SMTP authentication command 'auth plain' or 'auth login'
Type: Text Default: "" Examples: Event.auth "/usr/local/selor/auth_rules"
Event.from - Defines a rule or rules file to be executed when the connected host specify the sender address (email) with SMTP command 'mail from:'
Type: Text Default: "" Examples: Event.from "/usr/local/selor/from_rules"
Event.rcpt - Defines a rule or rules file to be executed when the connected host specify the recipient address (email) with SMTP command 'rcpt to:'
Type: Text Default: "" Examples: Event.rcpt "/usr/local/selor/rcpt_rules"
Event.data_cmd (Selor >= 1.5)- Defines a rule or rules file to be executed when the connected host send the SMTP 'data' command (before of content of message)
Type: Text Default: "" Examples: Event.data "/usr/local/selor/data_cmd_rules"
Event.data - Defines a rule or rules file to be executed when the connected host finishes to send the email content. In this event we can run external programs to analyze the email content and decide what we do with this message.
Type: Text Default: "" Examples: Event.data "/usr/local/selor/data_rules"
Event.qstart_process (Selor >= 1.5) - Defines a rule or rules file to be executed when queue file is open.
Type: Text Default: "" Examples: Event.qstart_process "/usr/local/selor/qstart_rules"
Event.qend_process - Defines a rule or rules file to be executed when MTA Selor finishes to process a email queue file. For example: When the Selor is processing the queue file with ID 123456789_1234 and finish it and close the queue file, this event is called and you can run external programs to analyze the recipient queue file list (/var/spool/selor/l123456789_1234) that contains a list of all recipients and look what which were delivered, what had errors and are pending.
Type: Text Default: "" Examples: Event.qend_process "/usr/local/selor/qend_rules"
Event.error_report - Defines a rule or rules file to be executed before MTA Selor send a MAILER-DAEMON message to a recipient.
Type: Text Default: "" Examples: Event.connection "/usr/local/selor/connection_rules"
Event.dl_rcpt - Defines a rule or rules file to be executed when your server receives a answer from a remote host when specify the recipient. This answer is placed in %T variable for you use in this event file
Type: Text Default: "" Examples: Event.dl_rcpt "/usr/local/selor/rules_dl_rcpt"
Event.lrcpt_refused - Defines a rule or rules file to be executed when your server refuse a recipient from the remote host
Type: Text Default: "" Examples: Event.lrcpt_refused "/usr/local/selor/rules_lrcpt_refused"
Modseq_auth - When you load more than one database module, you can use this option to specify the consult sequence for these modules when your customer log in. The module name is always shown in the log file (selor_wrn.log) when the Selor server is started.
Type: Text Default: "" Examples: Modseq_auth "ldap mysql passwd" Modseq_auth "mysql ldap"
Modseq_domain - When you load more than one database module, you can use this option to specify the consult sequence for these modules when your server seek for local domains.
Type: Text Default: "" Examples: Modseq_auth "ldap mysql passwd" Modseq_auth "mysql ldap"
Modseq_mail - When you load more than one database module, you can use this option to specify the consult sequence for these modules when your server seek for local accounts and emails.
Type: Text Default: "" Examples: Modseq_auth "ldap mysql passwd" Modseq_auth "mysql ldap"
Modseq_alias - When you load more than one database module, you can use this option to specify a consult sequence for these modules when your server seek for alias address.
Type: Text Default: "" Examples: Modseq_auth "ldap mysql passwd" Modseq_auth "mysql ldap"
Tls_module - Option to specify the SS/TLS module for secure connections. MTA Selor needs this external module to accept and send emails via SSL/TLS connections.
Type: Text Default: "" Examples: Tls_module "/usr/local/selor/mod/selor_tls.so"
Tls_cafile - Option to specify the CAfile of certificate for the SSL/TLS module. If you want to use the SSL without a certification company, you can leave this option empty and generate a auto signed certificate.
Type: Text Default: "" Examples: Tls_cafile "/usr/local/selor/mod/certs/ca-bundle"
Tls_pubkey - To specify the file that contains the public key from your certificate.
Type: Text Default: "" Examples: Tls_pubkey "/usr/local/selor/mod/certs/public.crt"
Tls_privkey - To specify the file that contains the private key from your certificate.
Type: Text Default: "" Examples: Tls_privkey "/usr/local/selor/mod/certs/private.key"
Tls_enable - To enable/disable the SSL/TLS module. Even with loaded module, it is not activated if you not set the Tls_enable to 1, so is possible to enable/disable the TLS module depending of conditions in rules files called by events. 0 = Disabled 1 = Enable
Type: Numeric Default: 0 Examples: Tls_enable 0 Tls_enable 1
Tls_delivery - To enable/disable the use of TLS connections when Selor will deliver a email to another remote host. 0 = Disabled 1 = Enabled
Type: Numeric Default: 0 Examples: Tls_delivery 0 Tls_delivery 1
Pid_file - With this option you can define a file to MTA selor record its PID number and it can be stoped or restarted by shell script call (rc.selor). When you use more than one MTA Selor running in same server, you must set a another Pid_file for each daemon.
Type: Text Default: "/var/run/selor.pid" Examples: Pid_file "/var/run/selor.pid"
Timezone - Option to force a TIMEZONE for your server. When this option is disabled the Selor detects the timezone.
Type: Text Default: "" Examples: Timezone "-0300" Timezone "+0200" Timezone "+0000" Timezone "-0700"
Cp_errors_path - To specify a path for your server put the queues files that could not be delivered and its MAILER-DAEMONs messages could not be delivered too
Type: Text Default: "/var/spool/selor/errors" Examples: Cp_errors_path "/var/spool/selor/errors"
Temp_path - Is a temporary work directory. Sometimes the server or its modules need to create a temporary files to work.
Type: Text Default: "/var/spool/selor/tmp" Examples: Temp_path "/var/spool/selor/tmp" Temp_path "/tmp"
Queue_path - Directory for the email queue (Spool directory). Currently a email is divided in two files inside the spool directory: One with the content menssage (starts with 'c' character) and another that contains the list of recipients and its options (starts with 'l' character).
Type: Text Default: "/var/spool/selor/" Examples: Queue_path "/var/spool/selor/"
Report_file - Option to specify a text file that contains the base for creation of MAILER-DAEMONs messages.
Type: Text Default: "/usr/local/selor/error_report.txt" Examples: Report_file "/usr/local/selor/error_report.txt"
Dlocal -To indicate the MDA (Mail Deliver Agent for local deliveries). This is usually the program that comes with your POP3/IMAP agent.
Here are the possible variables available for this option: %l = The system user that will receive the message. %d = ID of message %r = Recipient email address %f = Sender email address %c = The recipient address domain %o = The sender address domain %m = The username that comes before the '@' in sender email address %p = The username that comes before the '@' in recipient email address %C = The 'HOME' directory of recipient
Type: Text Default: "/usr/bin/procmail -d %l " Examples: Dlocal "/usr/bin/procmail -d %l " Dlocal "/usr/local/libexec/dovecot/deliver -d %l < " Dlocal "/usr/local/bin/maildrop -d %l <"
Adlocal_allowed - Is possible to specify an another Dlocal for each recipient using the 'dlocal' field from your database module. The option 'Adlocal_allowed' is used to specify a list with allowed 'dlocals'. This prevents that an eventual error in your database allow others users to execute any programs from your operating system.
Type: Text Default: "" Examples: Adlocal_allowed "/usr/bin/procmail /usr/local/libexec/dovecot/deliver"
Postmaster - To specify the Postmaster email.
Type: Text Default: "postmaster@localhost" Examples: Postmaster "postmaster@domainexample.com.br"
Subject_error_msg - The messages for the subject field in MAILER-DAEMON emails.
Type: Text Default: "[Mail delivery error]" Examples: Subject_error_msg "[Mail delivery error]"
Report_from - The email address of sender for MAILER-DAEMON messages.
Type: Text Default: "<MAILER-DAEMON@localhost" Examples: Report_from "<MAILER-DAEMON@dominioexemplo.com.br"
Auth_relay - Enable/Disable the Relay to authenticated connections. 0 = Disabled 1 = Enabled Type: Numeric Default: 1 Examples: Auth_relay 0 Auth_relay 1
Timeout - The maximum time in seconds that a TCP connection can stay inactive.
Type: Numeric Default: 120 Examples: Timeout 60 Timeout 30
Connect_timeout - The maximum time in seconds to stablish a TCP connection with another remote MTA.
Type: Numeric Default: 60 Examples: Connect_timeout 60 Connect_timeout 30
Resolve_all - Enable/Disable the automatic resolution for IPs that have connected. You can disable this option for uour server not lose time resolving the name of all IPs, but you can use action 'Resolve!' in rules files to resolve the name for some connections like: connections without authentication. 0 = Disabled 1 = Enabled
Type: Numeric Default: 1 Examples: Resolve_all 0 Resolve_all 1
Max_rcpts - Maximum recipients allowed for each email.
Tipo: Numeric Default: 100 Examples: Max_rcpts 50 Max_rcpts 1000
Max_mail_size - The maximum size in bytes that each email can have
Type: Numeric Default: 10485760 (10 MB) Examples: Max_mail_size 15728640 Max_mail_size 31457280
Max_header_size - The maximum size in bytes that the email header can have. This option prevents loops between servers.
Type: Numeric Default: 51200 Examples: Max_header_size 51200
Max_attempts - The maximum number of attempts that Selor tries to deliver a email.
Type: Numeric Default: 48 Examples: Max_attempts 60 Max_attempts 100 Max_attempts 50
Max_error_report - The maximum number of attempts that Selor tries to deliver a MAILER-DAEMON message to a sender.
Type: Numeric Default: 3 Examples: Max_error_report 5 Max_error_report 2
Max_qprocs - The maximum queue process. If in a moment your server is with 10000 emails in queue and its uplink is not fast, this option limits the send numbers of emails at a time
Type: Numeric Default: 0 (Disabled) Examples: Max_qprocs 80 Max_qprocs 50
Mx_alias_ip - Enable/Disable the IP alias seek for MX during recipient domain discovery process 0 = Disabled 1 = Enabled Type: Numeric Default: 0 (Disabled) Examples: Mx_alias_ip 1 Mx_alias_ip 0
Cp_errors - Enable/Disable copy of messages that could not be delivered to its recipients and the MAILER-DAEMON messages could not be delivered too. The copy of message is made in directory appointed by Cp_errors and a warning message is sent to postmaster. 0 = Disabled 1 = Enabled
Type: Numeric Default: 1 (Enabled) Examples: Cp_errors 1 Cp_errors 0
Hshow_user - Enable/Disable the display the authenticated user in email header. 0 = Disabled 1 = Enabled
Type: Numeric Default: 0 (Disabled) Examples: Hshow_user 1 Hshow_user 0
Proto_level_check - Defines the SMTP protocol level check. There are two levels 0 = Disabled 1 = The sender and recipient must be between <>
Type: Numérico Default: 0 (Disabled) Examples: Proto_level_check 0 Proto_level_check 1
From_level_check - Defines the sender domain level check. 0 = Disabled 1 = The sender domain must exist 2 = The sender domain must have a MX register -1 (Selor >= 1.4) = Disables check errors like: Quota exceeded and User not found.
Type: Numeric Default: 1 Examples: From_level_check 0 From_level_check 2
Rcpt_level_check - Defines the recipient domain level check. 0 = Disable the DNS check system 1 = The recipient domain must exist. -1 (Selor >= 1.4) = Disables check errors like: Quota exceeded and User not found.
Type: Numeric Default: 0 Examples: Rcpt_level_check 1
Auth_tolerance - Defines the maximum number of authentication erros allowed. If the connected client err a number of times like 'Auth_tolerance', the connection is closed.
Type: Numeric Default: 3 Examples: Auth_tolerance 5 Auth_tolerance 2
Incorrect_pass_delay - Time in seconds that server must wait always customer err the password.
Type: Numeric Default: 3 Examples: Incorret_pass_delay 5 Incorret_pass_delay 2
No_mailbox_delay - Time in seconds that server must wait always the connected host specify a invalid address.
Type: Numeric Default: 2 Examples: No_mailbox_delay 5 No_mailbox_delay 3
Immed_delivery - Defines the delivery mode of local messages
0 = Do not deliver email as soon it is received. The work to do this is left for queue process. 1 = Tries to deliver email as soon that connected host close the connection. 2 = Tries to deliver email as soon it is accepted, for this, a new process is created via FORK function.
Type: Numeric Default: 1 Examples: Immed_delivery 0 Immed_delivery 2
Queue_time - Defines the time in minutes that queue process must wait to execute the same queue file again. When an email enters in server queue and Selor can not finish this file, a new attempt is made in 'Queue_time' minutes.
Type: Numeric Default: 15 Examples: Queue_time 10 Queue_time 30
Lavg_queue - The acceptable average limite for server deliver messages. If the average exceed this limit, the server will stop deliver messages until average go back to normal state.
Type: Numeric Default: 20 Examples: Lavg_queue 10
Lavg_negative - The acceptable average limit for server accept new messages. If the average exceed this limit, the server will stop accept new messages.
Type: Numeric Default: 40 Examples: Lavg_negative 30
Tarpit_limit - This is a limit value for external deliveries for each queue process. Many MTAs are configured to accept only a maximum number of recipients per connection. This option is made to server try to respect this limit. If you specify a Tarpit_limit with 30, the Selor will stop to specify a recipient in current connection when number of recipients reach 30. Then, after 'Tarpit_sleep' seconds, a new attempt will made to deliver the remainder.
Type: Numeric Default: this option is disable Examples: Tarpit_limit 50
Tarpit_sleep - Time in seconds to wait between the 'Tarpit' limits attempts.
Type: Numeric Default: 60 Examples: Tarpit_sleep 30
Force_alias_seek - Enable/Disable the seek of alias address even that already found. This permits to create a email copy using only the alias system.
Type: Numeric Default: 0 Examples: Force_alias_seek 1
Seek_df_alias - Enable/Disable the seek of default address. If this option is enabled and Selor not found the address passed, a new search is made in alias base with only '@' and if this is found, the message is delivered to address that this alias indicate.
Type: Numeric Default: 1 Examples: Seek_df_alias 0
Log_lvl - Defines the information level that are recorded in main log of your server. Currently exists only one level. 0 = Complete
Type: Numeric Default: 0 Examples: Log_lvl 0
Central_log - Defines the main log file. In this file all SMTP communications is recorded.
Type: Text Default: "/var/log/selor/selor.log" Examples: Central_log "/var/log/selor/selor.log"
Sumary_log - Defines the summary log where only emails flow is recorded. The informations that are recorded are: message ID, sender, recipient, message Size and transferred bytes
Type: Text Default: "/var/log/selor/selor_summary.log" Examples: Summary_log "/var/log/selor/selor_summary.log"
Warning_log - Defines the file where are recorded the warnings.
Type: Text Default: "/var/log/selor/selor_wrn.log" Examples: Warning_log "/var/log/selor/selor_wrn.log"
Refused_log - Defines the file where are recorded the senders or hosts that are refused. If a sender or host is refused, the refuse message and some information is recorded in this log file. You can use this file to generate a refuse statistic. This file is disabled by default.
Type: Text Default: (Desativado) Examples: Refused_log "/var/log/selor/selor_refused.log"
Qlimit_max_procs - Defines the maximum process to 'Qlimit' queue. The Qlimit is a second queue that are stored the messages that you use action 'Qlimit!'. This queue has another limitation process that controls it. The 'Qlimit!' action can be used to limit a customer that sends too many communication messages and these messages clogs the real queue. The qlimit is a lower queue priority.
Type: Numeric Default: 0 (Desativada) Examples: Qlimit_max_procs 50 Qlimit_max_procs 100
Qlimit_time - Defines the time that the queue process must wait to reprocess that same queue file in qlimit spool directory.
Type: Numeric Default: 8 Examples: Qlimit_time 5 Qlimit_time 10
Qsleep_time - Defines the time in seconds that queue process sleeps. The queue process looks the spool directory to see what are files to be processed in a interval defined by this option. The default value for this is 60 seconds, but there are cases that the queue, normal or qlimit, is very busy and the default value can be much time for Selor wait to start a new processing of queue.
Type: Numeric Default: 60 Examples: Qsleep_time 20 Qsleep_time 35 Qsleep_time 15
Srs_key - Enables and defines a encryption key to generate a SRS redirection. Do not use this with the name of your server.
Type: Text Default: (Disabled) Examples: Srs_key "senha123" Srs_key "minhasenha"
Srs_shift - Defines the value of shuffling to the key used for SRS. The acceptable values are: 0 - 255
Type: Numeric Default: 0 Examples: Srs_shift 1 Srs_shift 45 Srs_shift 255 Srs_shift 178 Srs_shift 0
Srs_alias_redir - Enables/Disables the automatic SRS for each external redirect done via Alias.
Type: Numeric Default: 1 Examples: Srs_alias_redir 0
Max_msgs_per_cnx - Defines the maximum number of messages per connection.
Type: Numeric Default: 100 Examples: Max_msgs_per_cnx 50 Max_msgs_per_cnx 1000
Df_domain - Defines the default domain to be used when a email is specified without a domain
Type: Text Default: (Disabled) Examples: Df_domain "mydomain.com"
Allow_broadcasts (Selor >= 1.3)- Enabled/Disables the Alias Broadcast resource. This resource allow to create an Alias that redirects an email to all addresses of a domain. For this resource work the module must have support. Currently the selor_mysql 1.1 support this. To use this resource you must create an alias that redirects to address without a 'user'. Like this: all@mydomainexample.com -> @mydomainexample.com
0 = Disabled 1 = Enabled
Type: Numeric Default: 1 Examples: Allow_broadcasts 1 Allow_broadcasts 0
Dlocal_max_procs (Selor >= 1.4) - Defines the maximum number to local delivery. You can define the maxium number of MDA process (The program indicated by Dlocal option). This prevents that many MDA process to generate a great I/O over the disc.
0 = Disabled 1 = Enabled
Type: Numeric Default: 0 Examples: Allow_broadcasts 1 Allow_broadcasts 0
Dlocal_type (Selor >= 1.4) - Defines how the program indicated by Dlocal is called. There are two modes: 0 and 1. 0 = The program in Dlocal is called directly without C function 'system'. In this mode you cannot use shellscripts with Dlocal and it tends to be faster than other. 1 = The program in Dlocal is called through C function 'system'. This function call a shell and it call the program. In this mode you can use shellscripts with Dlocal.
Type: Numeric Default: 1 Examples: Dlocal_type 1 Dlocal_type 0
Protocol Messages
Msg_welcome - This is a welcome message when a host connects in your server. Type: Text Default: "220 " Exemplos: Msg_welcome "220 Welcome to Server X"
Msg_full_mailbox - Message used when connected host tries to send an email to a full mailbox. Type: Text Default: "552 The mailbox is over quota"
Msg_invalid_cmd - Message used when the connected host send an invalid SMTP command. Type: Text Default: "500 Invalid command"
Msg_invalid_param - Message used when the connected host send an invalid param. Type: Text Default: "501 Invalid parameter"
Msg_sequence_error - Message used when the connected host send an invalid sequence of SMTP commands Type: Text Default: "503 Invalid sequence"
Msg_no_mailbox - Message used when the connected host specify a mailbox that not exist Type: Text Default: "550 No such user"
Msg_toomany_rcpts - Message used when the connected host exceeds the maximum number os recipients. Type: Text Default: "452 Too many recipients"
Msg_relay_denied - Message used when relay is denied to connected host Type: Text Default: "550 Relay denied"
Msg_transaction_falied - Message used when an unknown erros occurs. Type: Text Default: "554 Transaction error"
Msg_ok - Message sent when a SMTP command is accepted Type: Text Default: "250 Ok"
Msg_send_body - Message sent requesting the email body. Type: Text Default: "354 Ok"
Msg_allowed_sender - Message sent when the sender is sent. Type: Text Default: "250 Sender allowed"
Msg_refused - Message when something is refused. Type: Text Default: "550 Refused"
Msg_allowed_rcpt - Message when the recipient is accepted. Type: Text Default: "250 Rcpt allowed"
Msg_mail_accepted - Message when the email is accepted. Type: Text Default: "250 Msg accepted" Obs: The message always is preceded of ID that acquired in local spool directory.
Msg_goodbye - Message sent when the remote host disconnects Type: Text Default: "221 Ok"
Msg_auth_ok - Message sent when the authentication is successful. Type: Text Default: "235 Auth successful"
Msg_auth_falied - Message sent when the authentication fails. Type: Text Default: "535 Auth fail"
Msg_auth_required - Message sent when the connected host tries a relay without authentication Type: Text Default: "550 Auth required"
Msg_nodisk_space - Message sent when the disk space is over Type: Text Default: "452 No disk space"
Msg_perm_deny - Message used when occurs a permission error to do something. Type: Text Default: "421 Temp error. Try again later"
Msg_invalid_domain - Message sent to connected host when is specified a invalid domain. Type: Text Default: "553 Invalid domain:"
Msg_header_toobig - Message sent when the message is too big Type: Text Default: "554 Header too big"
Msg_internal_error - Message sent when a internal and unknow error occurs Type: Text Default: "451 Internal error"
Msg_cannot_connect - Message used in a MAILER-DAEMON warning when the Selor cannot connect in another MTA to deliver the message. Type: Text Default: "Could not connect to remote server"
Msg_mailbox_unavaibble - Message sent when occur a temporary error to deliver the message to a local mailbox Type: Text Default: "451 Mailbox unavailable"
Msg_mail_toobig - Message sent when connected host tries to deliver an email greater than value specified by Max_mail_size Type: Text Default: "552 Message too big"
Msg_lavg - Message sent when Load Average limit of sever is reached and no message will be accepted Type: Text Default: "450 Load average, try again later"
Msg_cannot_resolve - Message used when the recipient passed contains a domain that not exist or has DNS problems Type: Text Default: "Invalid domain or no MX record"
|