user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
web:
# Хост, на котором будет доступен интерфейс управления
host: postal.office-reklama.ru
# ротокол, который запрашивает интерфейс управления, должен происходить на
protocol: https
fast_server:
# This can be enabled to enable click & open tracking on emails. It is disabled by
# default as it requires a separate static IP address on your server.
enabled: false
bind_address:
general:
# This can be changed to allow messages to be sent from multiple IP addresses
use_ip_pools: false
main_db:
# Specify the connection details for your MySQL database
host: 127.0.0.1
username: postal
password: **********
database: postal
message_db:
# Specify the connection details for your MySQL server that will be house the
# message databases for mail servers.
host: 127.0.0.1
username: postal
password: **************
prefix: postal
rabbitmq:
# Specify the connection details for your RabbitMQ server.
host: 127.0.0.1
username: postal
password: **************
vhost: /postal
ns:
# Specifies the DNS record that you have configured. Refer to the documentation at
# https://github.com/atech/postal/wiki/Domains-&-DNS-Configuration for further
# information about these.
mx_records:
- mx.postal.example.com
smtp_server_hostname: postal.example.com
spf_include: spf.postal.example.com
return_path: rp.postal.example.com
route_domain: routes.postal.example.com
track_domain: track.postal.example.com
smtp:
# Specify an SMTP server that can be used to send messages from the Postal management
# system to users. You can configure this to use a Postal mail server once the
# your installation has been set up.
host: 127.0.0.1
port: 2525
username: # Complete when Postal is running and you can
password: # generate the credentials within the interface.
from_name: Postal
from_address: postal@yourdomain.com
rails:
# This is generated automatically by the config initialization. It should be a random
# string unique to your installation.
secret_key: 9ca7f25bfb9eb187ac944ceef4fdddc566471b663417dfbf1324064ddbd2860928d54cf87da474aac1044fe5cb5bcd1881cd04ca05def3d8d428a4efae7ae231fedf5d25f0e44f726bd74674781c317b16c22ca635724f09da6ecdca1f60ed2675246415f76342d630cd9a5a88421ec848236200bd28c32a306848cfa7268161
# These are the default configuration options that will be used if they aren't overriden
# in your postal.yml configuration file. No changes should be made to this file for
# your installation.
# You can refer to this for a complete listing all available configuration options.
web:
host: postal.office-reklama.ru
protocol: https
general:
use_ip_pools: false
exception_url:
maximum_delivery_attempts: 18
maximum_hold_expiry_days: 7
use_local_ns_for_domains: false
web_server:
bind_address: 127.0.0.1
port: 5000
max_threads: 5
fast_server:
enabled: false
bind_address:
# Set appropriate IP addresses to listen on. These should be dedicated IP
# addresses just used for this server. You should list IPv4 and IPv6 addresses
# as appropriate.
# - 1.2.3.4
# - abcd:a:b:c:d::1
port: 80
ssl_port: 443
proxy_protocol: false
default_private_key_path: # Defaults to config/fast_server.key
default_tls_certificate_path: # Defaults to config/fast_server.cert
main_db:
host: 127.0.0.1
port: 3306
username: postal
password:
database: postal
pool_size: 5
logging:
stdout: false
root: # Automatically determined based on config root
max_log_file_size: 20
max_log_files: 10
greylog:
host:
port: 12201
message_db:
host: 127.0.0.1
port: 3306
username: postal
password:
prefix: postal
rabbitmq:
host: 127.0.0.1
port: 5672
username: postal
password:
vhost: /postal
workers:
quantity: 1
threads: 4
smtp_server:
port: 25
tls_enabled: false
tls_certificate_path: # Defaults to config/smtp.cert
tls_private_key_path: # Defaults to config/smtp.key
tls_ciphers:
ssl_version: SSLv23
proxy_protocol: false
log_connect: true
strip_received_headers: false
max_message_size: 14 # size in Megabytes
smtp_relays:
-
hostname:
port: 25
ssl_mode: Auto
dns:
mx_records:
- mx.postal.office-reklama.ru
smtp_server_hostname: postal.office-reklama.ru
spf_include: spf.postal.example.com
return_path: rp.postal.office-reklama.ru
route_domain: routes.mail.office-reklama.ru
track_domain: track.mail.office-reklama.ru
helo_hostname: # By default, this will be the same as the `smtp_server_hostname`
dkim_identifier: postal
domain_verify_prefix: postal-verification
custom_return_path_prefix: psrp
smtp:
host: 127.0.0.1
port: 25
username: # Complete when Postal is running and you can
password: # generate the credentials within the interface.
from_name: Postal
from_address: postal@yourdomain.com
rails:
environment: production
secret_key:
spamd:
enabled: false
host: 127.0.0.1
port: 783
clamav:
enabled: false
host: 127.0.0.1
port: 2000
smtp_client:
open_timeout: 30
read_timeout: 60
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful