# Virtual Mailhosting System Guide - Can't get It working

## The Shadow Surfer

I have followed the "Virtual Mailhosting System Guide"

I havde made a vitual user: ngk@shadowsite.net

The user can login in to SquirrelMail and send mails! but when I send an email to ngk@shadowsite.net, I get this replay:

```

   ERROR: Your message could not be delivered as requested.

The mail server generated the following error message:

    This is the Postfix program at host server.

    I'm sorry to have to inform you that the message returned

    below could not be delivered to one or more destinations.

    For further assistance, please send mail to <postmaster>

    If you do so, please include this problem report. You can

    delete your own text from the message returned below.

                            The Postfix program

    <ngk@shadowsite.net>: unknown user: "ngk"

Additional message error details can be viewed HERE.

The text of the returned message can be viewed HERE.

```

I have tried doing some troubleshooting

when doing telnet localhost $port, I get and ok on 143 and 110 but on 25 I only get:

```

Trying 127.0.0.1

Connected to localhost.

Escape character is '^]

220 server ESMTP Postfix

```

When doing step:  Code listing 6.2: Verifying sasl and tls support I get

```

Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'.

220 server ESMTP Postfix

EHLO shadowsite.net

250-mail.domain.com

250-PIPELINING

250-SIZE 10240000

250-VRFY

250-ETRN

250-STARTTLS

250-XVERP

250 8BITMIME

```

I don't get:

```

250-AUTH LOGIN PLAIN OTP

250-AUTH=LOGIN PLAIN OTP

```

What have I missed  :Question: 

----------

## Dr_Stein

Is your domain a "virtual" domain? or "local?"

It looks like postfix isn't looking at your virtual domains (which you have stored in mysql)

Are you going to ues MySQL? If not, you'll need to create an /etc/postfix/virtual file and list virtual domains in there. It's dead easy.. let me know which method you were going for, and I might be able to help.  :Smile: 

----------

## The Shadow Surfer

/etc/postfix/main.cf

```

# Global Postfix configuration file. This file lists only a subset

# of all 250+ parameters. See the sample-xxx.cf files for a full list.

#

# The general format is lines with parameter = value pairs. Lines

# that begin with whitespace continue the previous line. A value can

# contain references to other $names or ${name}s.

#

# NOTE - CHANGE NO MORE THAN 2-3 PARAMETERS AT A TIME, AND TEST IF

# POSTFIX STILL WORKS AFTER EVERY CHANGE.

# SOFT BOUNCE

#

# The soft_bounce parameter provides a limited safety net for

# testing.  When soft_bounce is enabled, mail will remain queued that

# would otherwise bounce. This parameter disables locally-generated

# bounces, and prevents the SMTP server from rejecting mail permanently

# (by changing 5xx replies into 4xx replies). However, soft_bounce

# is no cure for address rewriting mistakes or mail routing mistakes.

#

#soft_bounce = no

# LOCAL PATHNAME INFORMATION

#

# The queue_directory specifies the location of the Postfix queue.

# This is also the root directory of Postfix daemons that run chrooted.

# See the files in examples/chroot-setup for setting up Postfix chroot

# environments on different UNIX systems.

#

queue_directory = /var/spool/postfix

# The command_directory parameter specifies the location of all

# postXXX commands.

#

command_directory = /usr/sbin

# The daemon_directory parameter specifies the location of all Postfix

# daemon programs (i.e. programs listed in the master.cf file). This

# directory must be owned by root.

#

daemon_directory = /usr/lib/postfix

# QUEUE AND PROCESS OWNERSHIP

#

# The mail_owner parameter specifies the owner of the Postfix queue

# and of most Postfix daemon processes.  Specify the name of a user

# account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS

# AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM.  In

# particular, don't specify nobody or daemon. PLEASE USE A DEDICATED

# USER.

#

mail_owner = postfix

# The default_privs parameter specifies the default rights used by

# the local delivery agent for delivery to external file or command.

# These rights are used in the absence of a recipient user context.

# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.

#

#default_privs = nobody

# INTERNET HOST AND DOMAIN NAMES

#

# The myhostname parameter specifies the internet hostname of this

# mail system. The default is to use the fully-qualified domain name

# from gethostname(). $myhostname is used as a default value for many

# other configuration parameters.

#

#myhostname = host.domain.tld

#myhostname = virtual.domain.tld

# The mydomain parameter specifies the local internet domain name.

# The default is to use $myhostname minus the first component.

# $mydomain is used as a default value for many other configuration

# parameters.

#

#mydomain = domain.tld

# SENDING MAIL

#

# The myorigin parameter specifies the domain that locally-posted

# mail appears to come from. The default is to append $myhostname,

# which is fine for small sites.  If you run a domain with multiple

# machines, you should (1) change this to $mydomain and (2) set up

# a domain-wide alias database that aliases each user to

# user@that.users.mailhost.

#

# For the sake of consistency between sender and recipient addresses,

# myorigin also specifies the default domain name that is appended

# to recipient addresses that have no @domain part.

#

#myorigin = $myhostname

#myorigin = $mydomain

# RECEIVING MAIL

# The inet_interfaces parameter specifies the network interface

# addresses that this mail system receives mail on.  By default,

# the software claims all active interfaces on the machine. The

# parameter also controls delivery of mail to user@[ip.address].

#

# See also the proxy_interfaces parameter, for network addresses that

# are forwarded to us via a proxy or network address translator.

#

# Note: you need to stop/start Postfix when this parameter changes.

#

#inet_interfaces = all

#inet_interfaces = $myhostname

#inet_interfaces = $myhostname, localhost

# The proxy_interfaces parameter specifies the network interface

# addresses that this mail system receives mail on by way of a

# proxy or network address translation unit. This setting extends

# the address list specified with the inet_interfaces parameter.

#

# You must specify your proxy/NAT addresses when your system is a

# backup MX host for other domains, otherwise mail delivery loops

# will happen when the primary MX host is down.

#

#proxy_interfaces =

#proxy_interfaces = 1.2.3.4

# The mydestination parameter specifies the list of domains that this

# machine considers itself the final destination for.

#

# These domains are routed to the delivery agent specified with the

# local_transport parameter setting. By default, that is the UNIX

# compatible delivery agent that lookups all recipients in /etc/passwd

# and /etc/aliases or their equivalent.

#

# The default is $myhostname + localhost.$mydomain.  On a mail domain

# gateway, you should also include $mydomain.

#

# Do not specify the names of virtual domains - those domains are

# specified elsewhere (see sample-virtual.cf).

#

# Do not specify the names of domains that this machine is backup MX

# host for. Specify those names via the relay_domains settings for

# the SMTP server, or use permit_mx_backup if you are lazy (see

# sample-smtpd.cf).

#

# The local machine is always the final destination for mail addressed

# to user@[the.net.work.address] of an interface that the mail system

# receives mail on (see the inet_interfaces parameter).

#

# Specify a list of host or domain names, /file/name or type:table

# patterns, separated by commas and/or whitespace. A /file/name

# pattern is replaced by its contents; a type:table is matched when

# a name matches a lookup key (the right-hand side is ignored).

# Continue long lines by starting the next line with whitespace.

#

# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".

#

#mydestination = $myhostname, localhost.$mydomain

#mydestination = $myhostname, localhost.$mydomain $mydomain

#mydestination = $myhostname, localhost.$mydomain, $mydomain,

#       mail.$mydomain, www.$mydomain, ftp.$mydomain

# REJECTING MAIL FOR UNKNOWN LOCAL USERS

#

# The local_recipient_maps parameter specifies optional lookup tables

# with all names or addresses of users that are local with respect

# to $mydestination and $inet_interfaces.

#

# If this parameter is defined, then the SMTP server will reject

# mail for unknown local users. This parameter is defined by default.

#

# To turn off local recipient checking in the SMTP server, specify

# local_recipient_maps = (i.e. empty).

#

# The default setting assumes that you use the default Postfix local

# delivery agent for local delivery. You need to update the

# local_recipient_maps setting if:

#

# - You define $mydestination domain recipients in files other than

#   /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.

#   For example, you define $mydestination domain recipients in

#   the $virtual_mailbox_maps files.

#

# - You redefine the local delivery agent in master.cf.

#

# - You redefine the "local_transport" setting in main.cf.

#

# - You use the "luser_relay", "mailbox_transport", or "fallback_transport"

#   feature of the Postfix local delivery agent (see sample-local.cf).

#

# Details are described in the LOCAL_RECIPIENT_README file.

#

# Beware: if the Postfix SMTP server runs chrooted, you probably have

# to access the passwd file via the proxymap service, in order to

# overcome chroot restrictions. The alternative, having a copy of

# the system passwd file in the chroot jail is just not practical.

#

#local_recipient_maps = unix:passwd.byname $alias_maps

#local_recipient_maps = proxy:unix:passwd.byname $alias_maps

#local_recipient_maps =

# The unknown_local_recipient_reject_code specifies the SMTP server

# response code when a recipient domain matches $mydestination or

# $inet_interfaces, while $local_recipient_maps is non-empty and the

# recipient address or address local-part is not found.

#

# The default setting is 550 (reject mail) but it is safer to start

# with 450 (try again later) until you are certain that your

# local_recipient_maps settings are OK.

#

#unknown_local_recipient_reject_code = 550

unknown_local_recipient_reject_code = 450

# TRUST AND RELAY CONTROL

# The mynetworks parameter specifies the list of "trusted" SMTP

# clients that have more privileges than "strangers".

#

# In particular, "trusted" SMTP clients are allowed to relay mail

# through Postfix.  See the smtpd_recipient_restrictions parameter

# in file sample-smtpd.cf.

#

# You can specify the list of "trusted" network addresses by hand

# or you can let Postfix do it for you (which is the default).

#

# By default (mynetworks_style = subnet), Postfix "trusts" SMTP

# clients in the same IP subnetworks as the local machine.

# On Linux, this does works correctly only with interfaces specified

# with the "ifconfig" command.

#

# Specify "mynetworks_style = class" when Postfix should "trust" SMTP

# clients in the same IP class A/B/C networks as the local machine.

# Don't do this with a dialup site - it would cause Postfix to "trust"

# your entire provider's network.  Instead, specify an explicit

# mynetworks list by hand, as described below.

#

# Specify "mynetworks_style = host" when Postfix should "trust"

# only the local machine.

#

#mynetworks_style = class

#mynetworks_style = subnet

#mynetworks_style = host

# Alternatively, you can specify the mynetworks list by hand, in

# which case Postfix ignores the mynetworks_style setting.

#

# Specify an explicit list of network/netmask patterns, where the

# mask specifies the number of bits in the network part of a host

# address.

#

# You can also specify the absolute pathname of a pattern file instead

# of listing the patterns here. Specify type:table for table-based lookups

# (the value on the table right-hand side is not used).

#

#mynetworks = 168.100.189.0/28, 127.0.0.0/8

#mynetworks = $config_directory/mynetworks

#mynetworks = hash:/etc/postfix/network_table

# The relay_domains parameter restricts what destinations this system will

# relay mail to.  See the smtpd_recipient_restrictions restriction in the

# file sample-smtpd.cf for detailed information.

#

# By default, Postfix relays mail

# - from "trusted" clients (IP address matches $mynetworks) to any destination,

# - from "untrusted" clients to destinations that match $relay_domains or

#   subdomains thereof, except addresses with sender-specified routing.

# The default relay_domains value is $mydestination.

#

# In addition to the above, the Postfix SMTP server by default accepts mail

# that Postfix is final destination for:

# - destinations that match $inet_interfaces,

# - destinations that match $mydestination

# - destinations that match $virtual_alias_domains,

# - destinations that match $virtual_mailbox_domains.

# These destinations do not need to be listed in $relay_domains.

#

# Specify a list of hosts or domains, /file/name patterns or type:name

# lookup tables, separated by commas and/or whitespace.  Continue

# long lines by starting the next line with whitespace. A file name

# is replaced by its contents; a type:name table is matched when a

# (parent) domain appears as lookup key.

#

# NOTE: Postfix will not automatically forward mail for domains that

# list this system as their primary or backup MX host. See the

# permit_mx_backup restriction in the file sample-smtpd.cf.

#

#relay_domains = $mydestination

# INTERNET OR INTRANET

# The relayhost parameter specifies the default host to send mail to

# when no entry is matched in the optional transport(5) table. When

# no relayhost is given, mail is routed directly to the destination.

#

# On an intranet, specify the organizational domain name. If your

# internal DNS uses no MX records, specify the name of the intranet

# gateway host instead.

#

# In the case of SMTP, specify a domain, host, host:port, [host]:port,

# [address] or [address]:port; the form [host] turns off MX lookups.

#

# If you're connected via UUCP, see also the default_transport parameter.

#

#relayhost = $mydomain

#relayhost = gateway.my.domain

#relayhost = uucphost

#relayhost = [an.ip.add.ress]

# REJECTING UNKNOWN RELAY USERS

#

# The relay_recipient_maps parameter specifies optional lookup tables

# with all addresses in the domains that match $relay_domains.

#

# If this parameter is defined, then the SMTP server will reject

# mail for unknown relay users. This feature is off by default.

#

#relay_recipient_maps = hash:/etc/postfix/relay_recipients

# INPUT RATE CONTROL

#

# The in_flow_delay configuration parameter implements mail input

# flow control. This feature is turned on by default, although it

# still needs further development (it's disabled on SCO UNIX due

# to an SCO bug).

#

# A Postfix process will pause for $in_flow_delay seconds before

# accepting a new message, when the message arrival rate exceeds the

# message delivery rate. With the default 50 SMTP server process

# limit, this limits the mail inflow to 50 messages a second more

# than the number of messages delivered per second.

#

# Specify 0 to disable the feature. Valid delays are 0..10.

#

#in_flow_delay = 1s

# ADDRESS REWRITING

#

# Insert text from sample-rewrite.cf if you need to do address

# masquerading.

#

# Insert text from sample-canonical.cf if you need to do address

# rewriting, or if you need username->Firstname.Lastname mapping.

# ADDRESS REDIRECTION (VIRTUAL DOMAIN)

#

# Insert text from sample-virtual.cf if you need virtual domain support.

# "USER HAS MOVED" BOUNCE MESSAGES

#

# Insert text from sample-relocated.cf if you need "user has moved"

# style bounce messages. Alternatively, you can bounce recipients

# with an SMTP server access table. See sample-smtpd.cf.

# TRANSPORT MAP

#

# Insert text from sample-transport.cf if you need explicit routing.

# ALIAS DATABASE

#

# The alias_maps parameter specifies the list of alias databases used

# by the local delivery agent. The default list is system dependent.

#

# On systems with NIS, the default is to search the local alias

# database, then the NIS alias database. See aliases(5) for syntax

# details.

#

# If you change the alias database, run "postalias /etc/aliases" (or

# wherever your system stores the mail alias file), or simply run

# "newaliases" to build the necessary DBM or DB file.

#

# It will take a minute or so before changes become visible.  Use

# "postfix reload" to eliminate the delay.

#

#alias_maps = dbm:/etc/aliases

#alias_maps = hash:/etc/aliases

#alias_maps = hash:/etc/aliases, nis:mail.aliases

#alias_maps = netinfo:/aliases

alias_maps = hash:/etc/mail/aliases

# The alias_database parameter specifies the alias database(s) that

# are built with "newaliases" or "sendmail -bi".  This is a separate

# configuration parameter, because alias_maps (see above) may specify

# tables that are not necessarily all under control by Postfix.

#

#alias_database = dbm:/etc/aliases

#alias_database = dbm:/etc/mail/aliases

#alias_database = hash:/etc/aliases

#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases

alias_database = hash:/etc/mail/aliases

# ADDRESS EXTENSIONS (e.g., user+foo)

#

# The recipient_delimiter parameter specifies the separator between

# user names and address extensions (user+foo). See canonical(5),

# local(8), relocated(5) and virtual(5) for the effects this has on

# aliases, canonical, virtual, relocated and .forward file lookups.

# Basically, the software tries user+foo and .forward+foo before

# trying user and .forward.

#

#recipient_delimiter = +

# DELIVERY TO MAILBOX

#

# The home_mailbox parameter specifies the optional pathname of a

# mailbox file relative to a user's home directory. The default

# mailbox file is /var/spool/mail/user or /var/mail/user.  Specify

# "Maildir/" for qmail-style delivery (the / is required).

#

#home_mailbox = Mailbox

#home_mailbox = Maildir/

home_mailbox = .maildir/

# The mail_spool_directory parameter specifies the directory where

# UNIX-style mailboxes are kept. The default setting depends on the

# system type.

#

#mail_spool_directory = /var/mail

#mail_spool_directory = /var/spool/mail

# The mailbox_command parameter specifies the optional external

# command to use instead of mailbox delivery. The command is run as

# the recipient with proper HOME, SHELL and LOGNAME environment settings.

# Exception:  delivery for root is done as $default_user.

#

# Other environment variables of interest: USER (recipient username),

# EXTENSION (address extension), DOMAIN (domain part of address),

# and LOCAL (the address localpart).

#

# Unlike other Postfix configuration parameters, the mailbox_command

# parameter is not subjected to $parameter substitutions. This is to

# make it easier to specify shell syntax (see example below).

#

# Avoid shell meta characters because they will force Postfix to run

# an expensive shell process. Procmail alone is expensive enough.

#

# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN

# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.

#

#mailbox_command = /some/where/procmail

#mailbox_command = /some/where/procmail -a "$EXTENSION"

# The mailbox_transport specifies the optional transport in master.cf

# to use after processing aliases and .forward files. This parameter

# has precedence over the mailbox_command, fallback_transport and

# luser_relay parameters.

#

# Specify a string of the form transport:nexthop, where transport is

# the name of a mail delivery transport defined in master.cf.  The

# :nexthop part is optional. For more details see the sample transport

# configuration file.

#

# NOTE: if you use this feature for accounts not in the UNIX password

# file, then you must update the "local_recipient_maps" setting in

# the main.cf file, otherwise the SMTP server will reject mail for

# non-UNIX accounts with "User unknown in local recipient table".

#

#mailbox_transport = lmtp:unix:/file/name

#mailbox_transport = cyrus

# The fallback_transport specifies the optional transport in master.cf

# to use for recipients that are not found in the UNIX passwd database.

# This parameter has precedence over the luser_relay parameter.

#

# Specify a string of the form transport:nexthop, where transport is

# the name of a mail delivery transport defined in master.cf.  The

# :nexthop part is optional. For more details see the sample transport

# configuration file.

#

# NOTE: if you use this feature for accounts not in the UNIX password

# file, then you must update the "local_recipient_maps" setting in

# the main.cf file, otherwise the SMTP server will reject mail for

# non-UNIX accounts with "User unknown in local recipient table".

#

#fallback_transport = lmtp:unix:/file/name

#fallback_transport = cyrus

#fallback_transport =

# The luser_relay parameter specifies an optional destination address

# for unknown recipients.  By default, mail for unknown@$mydestination

# and unknown@[$inet_interfaces] is returned as undeliverable.

#

# The following expansions are done on luser_relay: $user (recipient

# username), $shell (recipient shell), $home (recipient home directory),

# $recipient (full recipient address), $extension (recipient address

# extension), $domain (recipient domain), $local (entire recipient

# localpart), $recipient_delimiter. Specify ${name?value} or

# ${name:value} to expand value only when $name does (does not) exist.

#

# luser_relay works only for the default Postfix local delivery agent.

#

# NOTE: if you use this feature for accounts not in the UNIX password

# file, then you must specify "local_recipient_maps =" (i.e. empty) in

# the main.cf file, otherwise the SMTP server will reject mail for

# non-UNIX accounts with "User unknown in local recipient table".

#

#luser_relay = $user@other.host

#luser_relay = $local@other.host

#luser_relay = admin+$local

# JUNK MAIL CONTROLS

#

# The controls listed here are only a very small subset. See the file

# sample-smtpd.cf for an elaborate list of anti-UCE controls.

# The header_checks parameter specifies an optional table with patterns

# that each logical message header is matched against, including

# headers that span multiple physical lines.

#

# By default, these patterns also apply to MIME headers and to the

# headers of attached messages. With older Postfix versions, MIME and

# attached message headers were treated as body text.

#

# For details, see the sample-filter.cf file.

#

#header_checks = regexp:/etc/postfix/header_checks

# FAST ETRN SERVICE

#

# Postfix maintains per-destination logfiles with information about

# deferred mail, so that mail can be flushed quickly with the SMTP

# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".

#

# By default, Postfix maintains deferred mail logfile information

# only for destinations that Postfix is willing to relay to (as

# specified in the relay_domains parameter). For other destinations,

# Postfix attempts to deliver ALL queued mail after receiving the

# SMTP "ETRN domain.tld" command, or after execution of "sendmail

# -qRdomain.tld". This can be slow when a lot of mail is queued.

#

# The fast_flush_domains parameter controls what destinations are

# eligible for this "fast ETRN/sendmail -qR" service.

#

#fast_flush_domains = $relay_domains

#fast_flush_domains =

# SHOW SOFTWARE VERSION OR NOT

#

# The smtpd_banner parameter specifies the text that follows the 220

# code in the SMTP server's greeting banner. Some people like to see

# the mail version advertised. By default, Postfix shows no version.

#

# You MUST specify $myhostname at the start of the text. That is an

# RFC requirement. Postfix itself does not care.

#

#smtpd_banner = $myhostname ESMTP $mail_name

#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)

# PARALLEL DELIVERY TO THE SAME DESTINATION

#

# How many parallel deliveries to the same user or domain? With local

# delivery, it does not make sense to do massively parallel delivery

# to the same user, because mailbox updates must happen sequentially,

# and expensive pipelines in .forward files can cause disasters when

# too many are run at the same time. With SMTP deliveries, 10

# simultaneous connections to the same domain could be sufficient to

# raise eyebrows.

#

# Each message delivery transport has its XXX_destination_concurrency_limit

# parameter.  The default is $default_destination_concurrency_limit for

# most delivery transports. For the local delivery agent the default is 2.

#local_destination_concurrency_limit = 2

#default_destination_concurrency_limit = 10

local_destination_concurrency_limit = 2

default_destination_concurrency_limit = 10

# DEBUGGING CONTROL

#

# The debug_peer_level parameter specifies the increment in verbose

# logging level when an SMTP client or server host name or address

# matches a pattern in the debug_peer_list parameter.

#

debug_peer_level = 2

# The debug_peer_list parameter specifies an optional list of domain

# or network patterns, /file/name patterns or type:name tables. When

# an SMTP client or server host name or address matches a pattern,

# increase the verbose logging level by the amount specified in the

# debug_peer_level parameter.

#

#debug_peer_list = 127.0.0.1

#debug_peer_list = some.domain

# The debugger_command specifies the external command that is executed

# when a Postfix daemon program is run with the -D option.

#

# Use "command .. & sleep 5" so that the debugger can attach before

# the process marches on. If you use an X-based debugger, be sure to

# set up your XAUTHORITY environment variable before starting Postfix.

#

debugger_command =

         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin

         xxgdb $daemon_directory/$process_name $process_id & sleep 5

# If you don't have X installed on the Postfix machine, try:

# debugger_command =

#       PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;

#       echo where) | gdb $daemon_directory/$process_name $process_id 2>&1

#       >$config_directory/$process_name.$process_id.log & sleep 5

# INSTALL-TIME CONFIGURATION INFORMATION

#

# The following parameters are used when installing a new Postfix version.

#

# sendmail_path: The full pathname of the Postfix sendmail command.

# This is the Sendmail-compatible mail posting interface.

#

sendmail_path = /usr/sbin/sendmail

# newaliases_path: The full pathname of the Postfix newaliases command.

# This is the Sendmail-compatible command to build alias databases.

#

newaliases_path = /usr/bin/newaliases

# mailq_path: The full pathname of the Postfix mailq command.  This

# is the Sendmail-compatible mail queue listing command.

#

mailq_path = /usr/bin/mailq

# setgid_group: The group for mail submission and queue management

# commands.  This must be a group name with a numerical group ID that

# is not shared with other accounts, not even with the Postfix account.

#

setgid_group = postdrop

# manpage_directory: The location of the Postfix on-line manual pages.

#

manpage_directory = /usr/share/man

# sample_directory: The location of the Postfix sample configuration files.

#

sample_directory = /etc/postfix/sample

# readme_directory: The location of the Postfix README files.

#

readme_directory = /usr/share/doc/postfix-2.0.3

myhostname = server

mydomain = shadowsite.net

```

 //I try setting mydomain to:

ngc.ath.cx (an outher domain I host) 

server (intranet name)

But this resualt in no respons from the server when sending to ngk@shadowsite.net

```

inet_interfaces = all

mydestination = $myhostname, localhost.$mydomain $mydomain

mynetworks = 192.168.1.0/24, 127.0.0.0/8

home_mailbox = .maildir/

local_destination_concurrency_limit = 2

default_destination_concurrency_limit = 10

smtpd_sasl_auth_enable = yes

smtpd_sasl2_auth_enable = yes

smtpd_sasl_security_options = noanonymous

broken_sasl_auth_clients = yes

smtpd_sasl_local_domain =

smtpd_recipient_restrictions =

                        permit_sasl_authenticated,

                        permit_mynetworks,

                        reject_unauth_destination

smtpd_use_tls = yes

smtpd_tls_auth_only = yes

smtpd_tls_key_file = /etc/postfix/newreq.pem

smtpd_tls_cert_file = /etc/postfix/newcert.pem

smtpd_tls_CAfile = /etc/postfix/cacert.pem

smtpd_tls_loglevel = 3

smtpd_tls_received_header = yes

smtpd_tls_session_cache_timeout = 3600s

tls_random_source = dev:/dev/urandom

alias_maps = mysql:/etc/postfix/mysql-aliases.cf

relocated_maps = mysql:/etc/postfix/mysql-relocated.cf

local_transport = local

local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname

virtual_transport = virtual

virtual_mailbox_domains =

        shadowsite.net,

        ngc.ath.cx,

        server

virtual_minimum_uid = 1000

virtual_gid_maps = static:$vmail-gid

virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf

virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf

virtual_uid_maps = static:$vmail-uid

virtual_mailbox_base = /

#virtual_mailbox_limit =

```

/etc/postfix/master.cf

```

.

.

.

.

.

# ==========================================================================

# service type  private unpriv  chroot  wakeup  maxproc command + args

#               (yes)   (yes)   (yes)   (never) (100)

# ==========================================================================

smtp      inet  n       -       n       -       -       smtpd -v

.

.

.

.

.

```

Just added and -v

/etc/postfix/mysql-aliases.cf

```

# mysql-aliases.cf

user            = mailsql

password        = The passwd for the database

dbname          = mailsql

table           = alias

select_field    = destination

where_field     = alias

hosts           = unix:/var/run/mysqld/mysqld.sock

```

/etc/postfix/mysql-relocated.cf

```

# mysql-relocated.cf

user            = mailsql

password        = The passwd for the database

dbname          = mailsql

table           = relocated

select_field    = destination

where_field     = email

hosts           = unix:/var/run/mysqld/mysqld.sock

```

/etc/postfix/mysql-transport.cf

```

# mysql-transport.cf

user            = mailsql

password        = The passwd for the database

dbname          = mailsql

table           = transport

select_field    = destination

where_field     = domain

hosts           = unix:/var/run/mysqld/mysqld.sock

```

/etc/postfix/myql-virtual-gid.cf

```

#myql-virtual-gid.cf

user            = mailsql

password        = The passwd for the database

dbname          = mailsql

table           = users

select_field    = gid

where_field     = email

additional_conditions = and postfix = 'y'

hosts           = unix:/var/run/mysqld/mysqld.sock

```

/etc/postfix/myql-virtual-maps.cf

```

#myql-virtual-maps.cf

user            = mailsql

password        = The passwd for the database

dbname          = mailsql

table           = users

select_field    = maildir

where_field     = email

additional_conditions = and postfix = 'y'

hosts           = unix:/var/run/mysqld/mysqld.sock

```

/etc/postfix/mysql-virtual-uid.cf

```

# mysql-virtual-uid.cf

user            = mailsql

password        = The passwd for the database

dbname          = mailsql

table           = users

select_field    = uid

where_field     = email

additional_conditions = and postfix = 'y'

hosts           = unix:/var/run/mysqld/mysqld.sock

```

/etc/postfix/mysql-virtual.cf

```

# mysql-virtual.cf

user            = mailsql

password        = The passwd for the database

dbname          = mailsql

table           = virtual

select_field    = destination

where_field     = email

hosts           = unix:/var/run/mysqld/mysqld.sock

```

Mysql databasen: mailsql

```

#

# Struktur dump for tabellen `alias`

#

CREATE TABLE alias (

  id int(11) NOT NULL auto_increment,

  alias varchar(128) NOT NULL default '',

  destination varchar(128) NOT NULL default '',

  PRIMARY KEY  (id)

) TYPE=MyISAM;

#

# Data dump for tabellen `alias`

#

INSERT INTO alias VALUES (1, 'root', 'root@shadowsite.net');

INSERT INTO alias VALUES (2, 'postmaster', 'postmaster@domain.com');

# --------------------------------------------------------

#

# Struktur dump for tabellen `relocated`

#

CREATE TABLE relocated (

  id int(11) NOT NULL auto_increment,

  email varchar(128) NOT NULL default '',

  destination varchar(128) NOT NULL default '',

  PRIMARY KEY  (id)

) TYPE=MyISAM;

#

# Data dump for tabellen `relocated`

#

# --------------------------------------------------------

#

# Struktur dump for tabellen `transport`

#

CREATE TABLE transport (

  id int(11) NOT NULL auto_increment,

  domain varchar(128) NOT NULL default '',

  destination varchar(128) NOT NULL default '',

  PRIMARY KEY  (id),

  UNIQUE KEY domain (domain)

) TYPE=MyISAM;

#

# Data dump for tabellen `transport`

#

INSERT INTO transport VALUES (1, 'server', 'local:');

INSERT INTO transport VALUES (2, 'shadowsite.net', 'virtual:');

# --------------------------------------------------------

#

# Struktur dump for tabellen `users`

#

CREATE TABLE users (

  id int(11) NOT NULL auto_increment,

  email varchar(128) NOT NULL default '',

  clear varchar(128) NOT NULL default '',

  name tinytext NOT NULL,

  uid int(11) NOT NULL default '1101',

  gid int(11) NOT NULL default '1101',

  homedir tinytext NOT NULL,

  maildir tinytext NOT NULL,

  quota tinytext NOT NULL,

  postfix enum('n','y') NOT NULL default 'y',

  PRIMARY KEY  (id),

  UNIQUE KEY email (email)

) TYPE=MyISAM;

#

# Data dump for tabellen `users`

#

INSERT INTO users VALUES (1, 'ngc@server', 'testpasswd', 'Nicolai Guido Klausen', 1000, 100, '/home/ngc', '/home/ngc/.maildir/', '', 'y');

INSERT INTO users VALUES (2, 'ngk@shadowsite.net', 'testpassword', 'Nicolai Guido Klausen', 1009, 100, '/home/vmail', '/home/vmail/shadowsite.net/ngk/.maildir/', '', 'y');

# --------------------------------------------------------

#

# Struktur dump for tabellen `virtual`

#

CREATE TABLE virtual (

  id int(11) NOT NULL auto_increment,

  email varchar(128) NOT NULL default '',

  destination varchar(128) NOT NULL default '',

  PRIMARY KEY  (id)

) TYPE=MyISAM;

#

# Data dump for tabellen `virtual`

#

```

----------

## The Shadow Surfer

This is the log when sending an email to ngk@shadowsite.net from ngc@rapenden.dk (when starting postfix: /usr/sbin/postfix -v -v start and mydomain is set to home)

tail -f /var/log/mail.{info,err,warn,log}

```

==> /var/log/mail.info <==

Apr  6 13:31:32 server postfix/smtpd[17910]: watchdog_stop: 0x809cbe8

Apr  6 13:31:32 server postfix/smtpd[17910]: watchdog_start: 0x809cbe8

Apr  6 13:33:08 server postfix/smtpd[17910]: rewrite stream disconnect

Apr  6 13:33:08 server postfix/smtpd[17910]: watchdog_stop: 0x809cbe8

Apr  6 13:33:08 server postfix/smtpd[17910]: watchdog_start: 0x809cbe8

Apr  6 13:33:12 server postfix/smtpd[17910]: idle timeout -- exiting

Apr  6 13:36:26 server postfix/sendmail[17922]: fatal: usage: mailq [options]

Apr  6 13:38:35 server postfix/postqueue[17938]: fatal: usage: postqueue -f | postqueue -p | postqueue -s site

Apr  6 13:43:28 server postfix/qmgr[17879]: 30CEE10774: from=<ngc@rapanden.dk>, size=1440, nrcpt=1 (queue active)

Apr  6 13:43:28 server postfix/virtual[17961]: 30CEE10774: to=<ngk@shadowsite.net>, relay=virtual, delay=88542, status=deferred (recipient ngk@shadowsite.net: bad uid -uid in virtual_uid_maps)

==> /var/log/mail.err <==

Apr  6 13:26:11 server postfix/postfix-script: fatal: the Postfix mail system is not running

Apr  6 13:36:26 server postfix/sendmail[17922]: fatal: usage: mailq [options]

Apr  6 13:38:35 server postfix/postqueue[17938]: fatal: usage: postqueue -f | postqueue -p | postqueue -s site

==> /var/log/mail.warn <==

Apr  6 13:26:11 server postfix/postfix-script: fatal: the Postfix mail system is not running

Apr  6 13:36:26 server postfix/sendmail[17922]: fatal: usage: mailq [options]

Apr  6 13:38:35 server postfix/postqueue[17938]: fatal: usage: postqueue -f | postqueue -p | postqueue -s site

==> /var/log/mail.log <==

Apr  6 13:31:32 server postfix/smtpd[17910]: watchdog_stop: 0x809cbe8

Apr  6 13:31:32 server postfix/smtpd[17910]: watchdog_start: 0x809cbe8

Apr  6 13:33:08 server postfix/smtpd[17910]: rewrite stream disconnect

Apr  6 13:33:08 server postfix/smtpd[17910]: watchdog_stop: 0x809cbe8

Apr  6 13:33:08 server postfix/smtpd[17910]: watchdog_start: 0x809cbe8

Apr  6 13:33:12 server postfix/smtpd[17910]: idle timeout -- exiting

Apr  6 13:36:26 server postfix/sendmail[17922]: fatal: usage: mailq [options]

Apr  6 13:38:35 server postfix/postqueue[17938]: fatal: usage: postqueue -f | postqueue -p | postqueue -s site

Apr  6 13:43:28 server postfix/qmgr[17879]: 30CEE10774: from=<ngc@rapanden.dk>, size=1440, nrcpt=1 (queue active)

Apr  6 13:43:28 server postfix/virtual[17961]: 30CEE10774: to=<ngk@shadowsite.net>, relay=virtual, delay=88542, status=deferred (recipient ngk@shadowsite.net: bad uid -uid in virtual_uid_maps)

==> /var/log/mail.info <==

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: mynetworks ~? debug_peer_list

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: mynetworks ~? fast_flush_domains

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: mynetworks ~? mynetworks

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: relay_domains ~? debug_peer_list

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: relay_domains ~? fast_flush_domains

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: relay_domains ~? mynetworks

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: relay_domains ~? permit_mx_backup_networks

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: relay_domains ~? qmqpd_authorized_clients

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: relay_domains ~? relay_domains

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: permit_mx_backup_networks ~? debug_peer_list

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: permit_mx_backup_networks ~? fast_flush_domains

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: permit_mx_backup_networks ~? mynetworks

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: permit_mx_backup_networks ~? permit_mx_backup_networks

Apr  6 13:44:25 server postfix/smtpd[17965]: maps_append: mysql:/etc/postfix/mysql-aliases.cf

Apr  6 13:44:25 server postfix/smtpd[17965]: mysqlname_parse(): set username to 'mailsql'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set password to 'The passwd for the database'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set database name to 'mailsql'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set table name to 'alias'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set select_field to 'destination'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set where_field to 'alias'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set additional_conditions to ''

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): adding host 'unix:/var/run/mysqld/mysqld.sock' to list of mysql server hosts

Apr  6 13:44:26 server postfix/smtpd[17965]: dict_open: mysql:/etc/postfix/mysql-aliases.cf

Apr  6 13:44:26 server postfix/smtpd[17965]: maps_append: mysql:/etc/postfix/mysql-virtual-maps.cf

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set username to 'mailsql'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set password to 'The passwd for the database'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set database name to 'mailsql'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set table name to 'users'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set select_field to 'maildir'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set where_field to 'email'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set additional_conditions to 'and postfix = 'y''

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): adding host 'unix:/var/run/mysqld/mysqld.sock' to list of mysql server hosts

==> /var/log/mail.log <==

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: mynetworks ~? debug_peer_list

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: mynetworks ~? fast_flush_domains

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: mynetworks ~? mynetworks

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: relay_domains ~? debug_peer_list

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: relay_domains ~? fast_flush_domains

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: relay_domains ~? mynetworks

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: relay_domains ~? permit_mx_backup_networks

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: relay_domains ~? qmqpd_authorized_clients

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: relay_domains ~? relay_domains

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: permit_mx_backup_networks ~? debug_peer_list

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: permit_mx_backup_networks ~? fast_flush_domains

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: permit_mx_backup_networks ~? mynetworks

Apr  6 13:44:25 server postfix/smtpd[17965]: match_string: permit_mx_backup_networks ~? permit_mx_backup_networks

Apr  6 13:44:25 server postfix/smtpd[17965]: maps_append: mysql:/etc/postfix/mysql-aliases.cf

Apr  6 13:44:25 server postfix/smtpd[17965]: mysqlname_parse(): set username to 'mailsql'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set password to 'The passwd for the database'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set database name to 'mailsql'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set table name to 'alias'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set select_field to 'destination'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set where_field to 'alias'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set additional_conditions to ''

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): adding host 'unix:/var/run/mysqld/mysqld.sock' to list of mysql server hosts

Apr  6 13:44:26 server postfix/smtpd[17965]: dict_open: mysql:/etc/postfix/mysql-aliases.cf

Apr  6 13:44:26 server postfix/smtpd[17965]: maps_append: mysql:/etc/postfix/mysql-virtual-maps.cf

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set username to 'mailsql'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set password to 'The passwd for the database'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set database name to 'mailsql'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set table name to 'users'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set select_field to 'maildir'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set where_field to 'email'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set additional_conditions to 'and postfix = 'y''

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): adding host 'unix:/var/run/mysqld/mysqld.sock' to list of mysql server hosts

Apr  6 13:44:26 server postfix/smtpd[17965]: dict_open: mysql:/etc/postfix/mysql-virtual-maps.cf

==> /var/log/mail.info <==

Apr  6 13:44:26 server postfix/smtpd[17965]: dict_open: mysql:/etc/postfix/mysql-virtual-maps.cf

Apr  6 13:44:26 server postfix/smtpd[17965]: maps_append: unix:passwd.byname

Apr  6 13:44:26 server postfix/smtpd[17965]: dict_open: unix:passwd.byname

Apr  6 13:44:26 server postfix/smtpd[17965]: maps_append: mysql:/etc/postfix/mysql-virtual.cf

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set username to 'mailsql'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set password to 'The passwd for the database'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set database name to 'mailsql'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set table name to 'virtual'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set select_field to 'destination'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set where_field to 'email'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set additional_conditions to ''

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): adding host 'unix:/var/run/mysqld/mysqld.sock' to list of mysql server hosts

Apr  6 13:44:26 server postfix/smtpd[17965]: dict_open: mysql:/etc/postfix/mysql-virtual.cf

Apr  6 13:44:26 server postfix/smtpd[17965]: maps_append: mysql:/etc/postfix/mysql-virtual-maps.cf

Apr  6 13:44:26 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? debug_peer_list

Apr  6 13:44:26 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? fast_flush_domains

Apr  6 13:44:27 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? mynetworks

Apr  6 13:44:27 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? permit_mx_backup_networks

Apr  6 13:44:27 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? qmqpd_authorized_clients

Apr  6 13:44:27 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? relay_domains

Apr  6 13:44:27 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? smtpd_access_maps

Apr  6 13:44:27 server postfix/smtpd[17965]: name_mask: noanonymous

Apr  6 13:44:27 server postfix/smtpd[17965]: starting TLS engine

Apr  6 13:44:27 server postfix/smtpd[17965]: watchdog_create: 0x809cbe8 18000

Apr  6 13:44:27 server postfix/smtpd[17965]: watchdog_stop: 0x809cbe8

Apr  6 13:44:27 server postfix/smtpd[17965]: watchdog_start: 0x809cbe8

==> /var/log/mail.log <==

Apr  6 13:44:26 server postfix/smtpd[17965]: maps_append: unix:passwd.byname

Apr  6 13:44:26 server postfix/smtpd[17965]: dict_open: unix:passwd.byname

Apr  6 13:44:26 server postfix/smtpd[17965]: maps_append: mysql:/etc/postfix/mysql-virtual.cf

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set username to 'mailsql'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set password to 'The passwd for the database'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set database name to 'mailsql'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set table name to 'virtual'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set select_field to 'destination'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set where_field to 'email'

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): set additional_conditions to ''

Apr  6 13:44:26 server postfix/smtpd[17965]: mysqlname_parse(): adding host 'unix:/var/run/mysqld/mysqld.sock' to list of mysql server hosts

Apr  6 13:44:26 server postfix/smtpd[17965]: dict_open: mysql:/etc/postfix/mysql-virtual.cf

Apr  6 13:44:26 server postfix/smtpd[17965]: maps_append: mysql:/etc/postfix/mysql-virtual-maps.cf

Apr  6 13:44:26 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? debug_peer_list

Apr  6 13:44:26 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? fast_flush_domains

Apr  6 13:44:27 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? mynetworks

Apr  6 13:44:27 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? permit_mx_backup_networks

Apr  6 13:44:27 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? qmqpd_authorized_clients

Apr  6 13:44:27 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? relay_domains

Apr  6 13:44:27 server postfix/smtpd[17965]: match_string: smtpd_access_maps ~? smtpd_access_maps

Apr  6 13:44:27 server postfix/smtpd[17965]: name_mask: noanonymous

Apr  6 13:44:27 server postfix/smtpd[17965]: starting TLS engine

Apr  6 13:44:27 server postfix/smtpd[17965]: watchdog_create: 0x809cbe8 18000

Apr  6 13:44:27 server postfix/smtpd[17965]: watchdog_stop: 0x809cbe8

Apr  6 13:44:27 server postfix/smtpd[17965]: watchdog_start: 0x809cbe8

Apr  6 13:44:27 server postfix/smtpd[17965]: connection established

==> /var/log/mail.info <==

Apr  6 13:44:27 server postfix/smtpd[17965]: connection established

Apr  6 13:44:27 server postfix/smtpd[17965]: master_notify: status 0

Apr  6 13:44:27 server postfix/smtpd[17965]: name_mask: resource

Apr  6 13:44:27 server postfix/smtpd[17965]: name_mask: software

Apr  6 13:44:27 server postfix/smtpd[17965]: connect from rasmus.rapanden.dk[195.249.214.150]

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 220 server ESMTP Postfix

Apr  6 13:44:27 server postfix/smtpd[17965]: watchdog_pat: 0x809cbe8

Apr  6 13:44:27 server postfix/smtpd[17965]: < rasmus.rapanden.dk[195.249.214.150]: EHLO rasmus.rapanden.dk

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250-server

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250-PIPELINING

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250-SIZE 10240000

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250-VRFY

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250-ETRN

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250-STARTTLS

Apr  6 13:44:27 server postfix/smtpd[17965]: match_hostname: rasmus.rapanden.dk ~? 192.168.1.0/24

Apr  6 13:44:28 server postfix/smtpd[17965]: match_hostaddr: 195.249.214.150 ~? 192.168.1.0/24

Apr  6 13:44:28 server postfix/smtpd[17965]: match_hostname: rasmus.rapanden.dk ~? 127.0.0.0/8

Apr  6 13:44:28 server postfix/smtpd[17965]: match_hostaddr: 195.249.214.150 ~? 127.0.0.0/8

Apr  6 13:44:28 server postfix/smtpd[17965]: match_list_match: rasmus.rapanden.dk: no match

Apr  6 13:44:28 server postfix/smtpd[17965]: match_list_match: 195.249.214.150: no match

Apr  6 13:44:28 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250 8BITMIME

Apr  6 13:44:28 server postfix/smtpd[17965]: watchdog_pat: 0x809cbe8

==> /var/log/mail.log <==

Apr  6 13:44:27 server postfix/smtpd[17965]: master_notify: status 0

Apr  6 13:44:27 server postfix/smtpd[17965]: name_mask: resource

Apr  6 13:44:27 server postfix/smtpd[17965]: name_mask: software

Apr  6 13:44:27 server postfix/smtpd[17965]: connect from rasmus.rapanden.dk[195.249.214.150]

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 220 server ESMTP Postfix

Apr  6 13:44:27 server postfix/smtpd[17965]: watchdog_pat: 0x809cbe8

Apr  6 13:44:27 server postfix/smtpd[17965]: < rasmus.rapanden.dk[195.249.214.150]: EHLO rasmus.rapanden.dk

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250-server

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250-PIPELINING

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250-SIZE 10240000

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250-VRFY

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250-ETRN

Apr  6 13:44:27 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250-STARTTLS

Apr  6 13:44:27 server postfix/smtpd[17965]: match_hostname: rasmus.rapanden.dk ~? 192.168.1.0/24

Apr  6 13:44:28 server postfix/smtpd[17965]: match_hostaddr: 195.249.214.150 ~? 192.168.1.0/24

Apr  6 13:44:28 server postfix/smtpd[17965]: match_hostname: rasmus.rapanden.dk ~? 127.0.0.0/8

Apr  6 13:44:28 server postfix/smtpd[17965]: match_hostaddr: 195.249.214.150 ~? 127.0.0.0/8

Apr  6 13:44:28 server postfix/smtpd[17965]: match_list_match: rasmus.rapanden.dk: no match

Apr  6 13:44:28 server postfix/smtpd[17965]: match_list_match: 195.249.214.150: no match

Apr  6 13:44:28 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250 8BITMIME

Apr  6 13:44:28 server postfix/smtpd[17965]: watchdog_pat: 0x809cbe8

Apr  6 13:44:28 server postfix/smtpd[17965]: < rasmus.rapanden.dk[195.249.214.150]: MAIL FROM:<ngc@rapanden.dk> SIZE=1251

==> /var/log/mail.info <==

Apr  6 13:44:28 server postfix/smtpd[17965]: < rasmus.rapanden.dk[195.249.214.150]: MAIL FROM:<ngc@rapanden.dk> SIZE=1251

Apr  6 13:44:28 server postfix/smtpd[17965]: extract_addr: input: <ngc@rapanden.dk>

Apr  6 13:44:28 server postfix/smtpd[17965]: extract_addr: result: ngc@rapanden.dk

Apr  6 13:44:28 server postfix/smtpd[17965]: fsspace: .: block size 4096, blocks free 224907

Apr  6 13:44:28 server postfix/smtpd[17965]: smtpd_check_size: blocks 4096 avail 224907 min_free 0 size 1251

Apr  6 13:44:28 server postfix/smtpd[17965]: connect to subsystem public/cleanup

Apr  6 13:44:28 server postfix/smtpd[17965]: public/cleanup socket: wanted attribute: queue_id

Apr  6 13:44:28 server postfix/smtpd[17965]: input attribute name: queue_id

Apr  6 13:44:28 server postfix/smtpd[17965]: input attribute value: 8FD7C107F2

Apr  6 13:44:28 server postfix/smtpd[17965]: public/cleanup socket: wanted attribute: (list terminator)

Apr  6 13:44:28 server postfix/smtpd[17965]: input attribute name: (end)

Apr  6 13:44:28 server postfix/smtpd[17965]: send attr flags = 2

Apr  6 13:44:28 server postfix/smtpd[17965]: 8FD7C107F2: client=rasmus.rapanden.dk[195.249.214.150]

Apr  6 13:44:28 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250 Ok

Apr  6 13:44:28 server postfix/smtpd[17965]: watchdog_pat: 0x809cbe8

Apr  6 13:44:29 server postfix/smtpd[17965]: < rasmus.rapanden.dk[195.249.214.150]: RCPT TO:<ngk@shadowsite.net>

Apr  6 13:44:29 server postfix/smtpd[17965]: extract_addr: input: <ngk@shadowsite.net>

Apr  6 13:44:29 server postfix/smtpd[17965]: extract_addr: result: ngk@shadowsite.net

Apr  6 13:44:29 server postfix/smtpd[17965]: generic_checks: START

Apr  6 13:44:29 server postfix/smtpd[17965]: generic_checks: name=permit_sasl_authenticated

Apr  6 13:44:29 server postfix/smtpd[17965]: generic_checks: name=permit_sasl_authenticated status=0

Apr  6 13:44:29 server postfix/smtpd[17965]: generic_checks: name=permit_mynetworks

Apr  6 13:44:29 server postfix/smtpd[17965]: permit_mynetworks: rasmus.rapanden.dk 195.249.214.150

Apr  6 13:44:29 server postfix/smtpd[17965]: match_hostname: rasmus.rapanden.dk ~? 192.168.1.0/24

==> /var/log/mail.log <==

Apr  6 13:44:28 server postfix/smtpd[17965]: extract_addr: input: <ngc@rapanden.dk>

Apr  6 13:44:28 server postfix/smtpd[17965]: extract_addr: result: ngc@rapanden.dk

Apr  6 13:44:28 server postfix/smtpd[17965]: fsspace: .: block size 4096, blocks free 224907

Apr  6 13:44:28 server postfix/smtpd[17965]: smtpd_check_size: blocks 4096 avail 224907 min_free 0 size 1251

Apr  6 13:44:28 server postfix/smtpd[17965]: connect to subsystem public/cleanup

Apr  6 13:44:28 server postfix/smtpd[17965]: public/cleanup socket: wanted attribute: queue_id

Apr  6 13:44:28 server postfix/smtpd[17965]: input attribute name: queue_id

Apr  6 13:44:28 server postfix/smtpd[17965]: input attribute value: 8FD7C107F2

Apr  6 13:44:28 server postfix/smtpd[17965]: public/cleanup socket: wanted attribute: (list terminator)

Apr  6 13:44:28 server postfix/smtpd[17965]: input attribute name: (end)

Apr  6 13:44:28 server postfix/smtpd[17965]: send attr flags = 2

Apr  6 13:44:28 server postfix/smtpd[17965]: 8FD7C107F2: client=rasmus.rapanden.dk[195.249.214.150]

Apr  6 13:44:28 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250 Ok

Apr  6 13:44:28 server postfix/smtpd[17965]: watchdog_pat: 0x809cbe8

Apr  6 13:44:29 server postfix/smtpd[17965]: < rasmus.rapanden.dk[195.249.214.150]: RCPT TO:<ngk@shadowsite.net>

Apr  6 13:44:29 server postfix/smtpd[17965]: extract_addr: input: <ngk@shadowsite.net>

Apr  6 13:44:29 server postfix/smtpd[17965]: extract_addr: result: ngk@shadowsite.net

Apr  6 13:44:29 server postfix/smtpd[17965]: generic_checks: START

Apr  6 13:44:29 server postfix/smtpd[17965]: generic_checks: name=permit_sasl_authenticated

Apr  6 13:44:29 server postfix/smtpd[17965]: generic_checks: name=permit_sasl_authenticated status=0

Apr  6 13:44:29 server postfix/smtpd[17965]: generic_checks: name=permit_mynetworks

Apr  6 13:44:29 server postfix/smtpd[17965]: permit_mynetworks: rasmus.rapanden.dk 195.249.214.150

Apr  6 13:44:29 server postfix/smtpd[17965]: match_hostname: rasmus.rapanden.dk ~? 192.168.1.0/24

Apr  6 13:44:29 server postfix/smtpd[17965]: match_hostaddr: 195.249.214.150 ~? 192.168.1.0/24

==> /var/log/mail.info <==

Apr  6 13:44:29 server postfix/smtpd[17965]: match_hostaddr: 195.249.214.150 ~? 192.168.1.0/24

Apr  6 13:44:29 server postfix/smtpd[17965]: match_hostname: rasmus.rapanden.dk ~? 127.0.0.0/8

Apr  6 13:44:29 server postfix/smtpd[17965]: match_hostaddr: 195.249.214.150 ~? 127.0.0.0/8

Apr  6 13:44:29 server postfix/smtpd[17965]: match_list_match: rasmus.rapanden.dk: no match

Apr  6 13:44:29 server postfix/smtpd[17965]: match_list_match: 195.249.214.150: no match

Apr  6 13:44:29 server postfix/smtpd[17965]: generic_checks: name=permit_mynetworks status=0

Apr  6 13:44:29 server postfix/smtpd[17965]: generic_checks: name=reject_unauth_destination

Apr  6 13:44:29 server postfix/smtpd[17965]: reject_unauth_destination: ngk@shadowsite.net

Apr  6 13:44:29 server postfix/smtpd[17965]: permit_auth_destination: ngk@shadowsite.net

Apr  6 13:44:29 server postfix/smtpd[17965]: connect to subsystem private/rewrite

Apr  6 13:44:29 server postfix/smtpd[17965]: send attr request = rewrite

Apr  6 13:44:29 server postfix/smtpd[17965]: send attr rule = canonicalize

Apr  6 13:44:29 server postfix/smtpd[17965]: send attr address = ngk@shadowsite.net

Apr  6 13:44:29 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: address

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: address

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute value: ngk@shadowsite.net

Apr  6 13:44:30 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: (list terminator)

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: (end)

Apr  6 13:44:30 server postfix/smtpd[17965]: rewrite_clnt: canonicalize: ngk@shadowsite.net -> ngk@shadowsite.net

Apr  6 13:44:30 server postfix/smtpd[17965]: send attr request = resolve

Apr  6 13:44:30 server postfix/smtpd[17965]: send attr address = ngk@shadowsite.net

Apr  6 13:44:30 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: transport

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: transport

==> /var/log/mail.log <==

Apr  6 13:44:29 server postfix/smtpd[17965]: match_hostname: rasmus.rapanden.dk ~? 127.0.0.0/8

Apr  6 13:44:29 server postfix/smtpd[17965]: match_hostaddr: 195.249.214.150 ~? 127.0.0.0/8

Apr  6 13:44:29 server postfix/smtpd[17965]: match_list_match: rasmus.rapanden.dk: no match

Apr  6 13:44:29 server postfix/smtpd[17965]: match_list_match: 195.249.214.150: no match

Apr  6 13:44:29 server postfix/smtpd[17965]: generic_checks: name=permit_mynetworks status=0

Apr  6 13:44:29 server postfix/smtpd[17965]: generic_checks: name=reject_unauth_destination

Apr  6 13:44:29 server postfix/smtpd[17965]: reject_unauth_destination: ngk@shadowsite.net

Apr  6 13:44:29 server postfix/smtpd[17965]: permit_auth_destination: ngk@shadowsite.net

Apr  6 13:44:29 server postfix/smtpd[17965]: connect to subsystem private/rewrite

Apr  6 13:44:29 server postfix/smtpd[17965]: send attr request = rewrite

Apr  6 13:44:29 server postfix/smtpd[17965]: send attr rule = canonicalize

Apr  6 13:44:29 server postfix/smtpd[17965]: send attr address = ngk@shadowsite.net

Apr  6 13:44:29 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: address

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: address

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute value: ngk@shadowsite.net

Apr  6 13:44:30 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: (list terminator)

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: (end)

Apr  6 13:44:30 server postfix/smtpd[17965]: rewrite_clnt: canonicalize: ngk@shadowsite.net -> ngk@shadowsite.net

Apr  6 13:44:30 server postfix/smtpd[17965]: send attr request = resolve

Apr  6 13:44:30 server postfix/smtpd[17965]: send attr address = ngk@shadowsite.net

Apr  6 13:44:30 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: transport

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: transport

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute value: virtual

==> /var/log/mail.info <==

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute value: virtual

Apr  6 13:44:30 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: nexthop

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: nexthop

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute value: shadowsite.net

Apr  6 13:44:30 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: recipient

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: recipient

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute value: ngk@shadowsite.net

Apr  6 13:44:30 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: flags

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: flags

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute value: 1024

Apr  6 13:44:30 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: (list terminator)

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: (end)

Apr  6 13:44:30 server postfix/smtpd[17965]: resolve_clnt_query: `ngk@shadowsite.net' -> t=`virtual' h=`shadowsite.net' r=`ngk@shadowsite.net'

Apr  6 13:44:30 server postfix/smtpd[17965]: ctable_locate: install entry key ngk@shadowsite.net

Apr  6 13:44:30 server postfix/smtpd[17965]: generic_checks: name=reject_unauth_destination status=0

Apr  6 13:44:31 server postfix/smtpd[17965]: generic_checks: END

Apr  6 13:44:31 server postfix/smtpd[17965]: smtpd_check_rcptmap: ngk@shadowsite.net

Apr  6 13:44:31 server postfix/smtpd[17965]: ctable_locate: leave existing entry key ngk@shadowsite.net

Apr  6 13:44:31 server postfix/smtpd[17965]: maps_find: ngk@shadowsite.net: not found

Apr  6 13:44:31 server postfix/smtpd[17965]: match_string: shadowsite.net ~? server

Apr  6 13:44:31 server postfix/smtpd[17965]: match_string: shadowsite.net ~? localhost.home

Apr  6 13:44:31 server postfix/smtpd[17965]: match_string: shadowsite.net ~? home

Apr  6 13:44:31 server postfix/smtpd[17965]: match_list_match: shadowsite.net: no match

Apr  6 13:44:31 server postfix/smtpd[17965]: maps_find: @shadowsite.net: not found

==> /var/log/mail.log <==

Apr  6 13:44:30 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: nexthop

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: nexthop

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute value: shadowsite.net

Apr  6 13:44:30 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: recipient

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: recipient

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute value: ngk@shadowsite.net

Apr  6 13:44:30 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: flags

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: flags

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute value: 1024

Apr  6 13:44:30 server postfix/smtpd[17965]: private/rewrite socket: wanted attribute: (list terminator)

Apr  6 13:44:30 server postfix/smtpd[17965]: input attribute name: (end)

Apr  6 13:44:30 server postfix/smtpd[17965]: resolve_clnt_query: `ngk@shadowsite.net' -> t=`virtual' h=`shadowsite.net' r=`ngk@shadowsite.net'

Apr  6 13:44:30 server postfix/smtpd[17965]: ctable_locate: install entry key ngk@shadowsite.net

Apr  6 13:44:30 server postfix/smtpd[17965]: generic_checks: name=reject_unauth_destination status=0

Apr  6 13:44:31 server postfix/smtpd[17965]: generic_checks: END

Apr  6 13:44:31 server postfix/smtpd[17965]: smtpd_check_rcptmap: ngk@shadowsite.net

Apr  6 13:44:31 server postfix/smtpd[17965]: ctable_locate: leave existing entry key ngk@shadowsite.net

Apr  6 13:44:31 server postfix/smtpd[17965]: maps_find: ngk@shadowsite.net: not found

Apr  6 13:44:31 server postfix/smtpd[17965]: match_string: shadowsite.net ~? server

Apr  6 13:44:31 server postfix/smtpd[17965]: match_string: shadowsite.net ~? localhost.home

Apr  6 13:44:31 server postfix/smtpd[17965]: match_string: shadowsite.net ~? home

Apr  6 13:44:31 server postfix/smtpd[17965]: match_list_match: shadowsite.net: no match

Apr  6 13:44:31 server postfix/smtpd[17965]: maps_find: @shadowsite.net: not found

Apr  6 13:44:31 server postfix/smtpd[17965]: mail_addr_find: ngk@shadowsite.net -> (not found)

==> /var/log/mail.info <==

Apr  6 13:44:31 server postfix/smtpd[17965]: mail_addr_find: ngk@shadowsite.net -> (not found)

Apr  6 13:44:31 server postfix/smtpd[17965]: maps_find: ngk@shadowsite.net: not found

Apr  6 13:44:31 server postfix/smtpd[17965]: match_string: shadowsite.net ~? server

Apr  6 13:44:31 server postfix/smtpd[17965]: match_string: shadowsite.net ~? localhost.home

Apr  6 13:44:31 server postfix/smtpd[17965]: match_string: shadowsite.net ~? home

Apr  6 13:44:31 server postfix/smtpd[17965]: match_list_match: shadowsite.net: no match

Apr  6 13:44:31 server postfix/smtpd[17965]: maps_find: @shadowsite.net: not found

Apr  6 13:44:31 server postfix/smtpd[17965]: mail_addr_find: ngk@shadowsite.net -> (not found)

Apr  6 13:44:31 server postfix/smtpd[17965]: dict_mysql_lookup using sql query: select destination from virtual where email = 'ngk@shadowsite.net' 

Apr  6 13:44:31 server postfix/smtpd[17965]: dict_mysql: attempting to connect to host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:31 server postfix/smtpd[17965]: dict_mysql: successful connection to host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:31 server postfix/smtpd[17965]: dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:31 server postfix/smtpd[17965]: dict_mysql_lookup: retrieved 0 rows

Apr  6 13:44:31 server postfix/smtpd[17965]: maps_find: ngk@shadowsite.net: not found

Apr  6 13:44:32 server postfix/smtpd[17965]: match_string: shadowsite.net ~? server

Apr  6 13:44:32 server postfix/smtpd[17965]: match_string: shadowsite.net ~? localhost.home

Apr  6 13:44:32 server postfix/smtpd[17965]: match_string: shadowsite.net ~? home

Apr  6 13:44:32 server postfix/smtpd[17965]: match_list_match: shadowsite.net: no match

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql_lookup using sql query: select destination from virtual where email = '@shadowsite.net' 

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql_lookup: retrieved 0 rows

==> /var/log/mail.log <==

Apr  6 13:44:31 server postfix/smtpd[17965]: maps_find: ngk@shadowsite.net: not found

Apr  6 13:44:31 server postfix/smtpd[17965]: match_string: shadowsite.net ~? server

Apr  6 13:44:31 server postfix/smtpd[17965]: match_string: shadowsite.net ~? localhost.home

Apr  6 13:44:31 server postfix/smtpd[17965]: match_string: shadowsite.net ~? home

Apr  6 13:44:31 server postfix/smtpd[17965]: match_list_match: shadowsite.net: no match

Apr  6 13:44:31 server postfix/smtpd[17965]: maps_find: @shadowsite.net: not found

Apr  6 13:44:31 server postfix/smtpd[17965]: mail_addr_find: ngk@shadowsite.net -> (not found)

Apr  6 13:44:31 server postfix/smtpd[17965]: dict_mysql_lookup using sql query: select destination from virtual where email = 'ngk@shadowsite.net' 

Apr  6 13:44:31 server postfix/smtpd[17965]: dict_mysql: attempting to connect to host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:31 server postfix/smtpd[17965]: dict_mysql: successful connection to host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:31 server postfix/smtpd[17965]: dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:31 server postfix/smtpd[17965]: dict_mysql_lookup: retrieved 0 rows

Apr  6 13:44:31 server postfix/smtpd[17965]: maps_find: ngk@shadowsite.net: not found

Apr  6 13:44:32 server postfix/smtpd[17965]: match_string: shadowsite.net ~? server

Apr  6 13:44:32 server postfix/smtpd[17965]: match_string: shadowsite.net ~? localhost.home

Apr  6 13:44:32 server postfix/smtpd[17965]: match_string: shadowsite.net ~? home

Apr  6 13:44:32 server postfix/smtpd[17965]: match_list_match: shadowsite.net: no match

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql_lookup using sql query: select destination from virtual where email = '@shadowsite.net' 

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql_lookup: retrieved 0 rows

Apr  6 13:44:32 server postfix/smtpd[17965]: maps_find: @shadowsite.net: not found

==> /var/log/mail.info <==

Apr  6 13:44:32 server postfix/smtpd[17965]: maps_find: @shadowsite.net: not found

Apr  6 13:44:32 server postfix/smtpd[17965]: mail_addr_find: ngk@shadowsite.net -> (not found)

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql_lookup using sql query: select maildir from users where email = 'ngk@shadowsite.net' and postfix = 'y'

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql: attempting to connect to host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql: successful connection to host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql_lookup: retrieved 1 rows

Apr  6 13:44:32 server postfix/smtpd[17965]: maps_find: mysql:/etc/postfix/mysql-virtual-maps.cf: ngk@shadowsite.net = /home/vmail/shadowsite.net/ngk/.maildir/

Apr  6 13:44:32 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250 Ok

Apr  6 13:44:32 server postfix/smtpd[17965]: watchdog_pat: 0x809cbe8

Apr  6 13:44:32 server postfix/smtpd[17965]: < rasmus.rapanden.dk[195.249.214.150]: DATA

Apr  6 13:44:32 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 354 End data with <CR><LF>.<CR><LF>

Apr  6 13:44:33 server postfix/smtpd[17965]: public/cleanup socket: wanted attribute: status

Apr  6 13:44:33 server postfix/cleanup[17966]: 8FD7C107F2: message-id=<1049626776.3a424548ccaa4@mail.rapanden.dk>

Apr  6 13:44:33 server postfix/qmgr[17879]: 8FD7C107F2: from=<ngc@rapanden.dk>, size=1439, nrcpt=1 (queue active)

Apr  6 13:44:33 server postfix/smtpd[17965]: input attribute name: status

Apr  6 13:44:33 server postfix/smtpd[17965]: input attribute value: 0

Apr  6 13:44:33 server postfix/virtual[17961]: 8FD7C107F2: to=<ngk@shadowsite.net>, relay=virtual, delay=5, status=deferred (recipient ngk@shadowsite.net: bad uid -uid in virtual_uid_maps)

Apr  6 13:44:33 server postfix/smtpd[17965]: public/cleanup socket: wanted attribute: reason

Apr  6 13:44:33 server postfix/smtpd[17965]: input attribute name: reason

Apr  6 13:44:33 server postfix/smtpd[17965]: input attribute value: (end)

==> /var/log/mail.log <==

Apr  6 13:44:32 server postfix/smtpd[17965]: mail_addr_find: ngk@shadowsite.net -> (not found)

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql_lookup using sql query: select maildir from users where email = 'ngk@shadowsite.net' and postfix = 'y'

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql: attempting to connect to host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql: successful connection to host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock

Apr  6 13:44:32 server postfix/smtpd[17965]: dict_mysql_lookup: retrieved 1 rows

Apr  6 13:44:32 server postfix/smtpd[17965]: maps_find: mysql:/etc/postfix/mysql-virtual-maps.cf: ngk@shadowsite.net = /home/vmail/shadowsite.net/ngk/.maildir/

Apr  6 13:44:32 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250 Ok

Apr  6 13:44:32 server postfix/smtpd[17965]: watchdog_pat: 0x809cbe8

Apr  6 13:44:32 server postfix/smtpd[17965]: < rasmus.rapanden.dk[195.249.214.150]: DATA

Apr  6 13:44:32 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 354 End data with <CR><LF>.<CR><LF>

Apr  6 13:44:33 server postfix/smtpd[17965]: public/cleanup socket: wanted attribute: status

Apr  6 13:44:33 server postfix/cleanup[17966]: 8FD7C107F2: message-id=<1049626776.3a424548ccaa4@mail.rapanden.dk>

Apr  6 13:44:33 server postfix/qmgr[17879]: 8FD7C107F2: from=<ngc@rapanden.dk>, size=1439, nrcpt=1 (queue active)

Apr  6 13:44:33 server postfix/smtpd[17965]: input attribute name: status

Apr  6 13:44:33 server postfix/smtpd[17965]: input attribute value: 0

Apr  6 13:44:33 server postfix/virtual[17961]: 8FD7C107F2: to=<ngk@shadowsite.net>, relay=virtual, delay=5, status=deferred (recipient ngk@shadowsite.net: bad uid -uid in virtual_uid_maps)

Apr  6 13:44:33 server postfix/smtpd[17965]: public/cleanup socket: wanted attribute: reason

Apr  6 13:44:33 server postfix/smtpd[17965]: input attribute name: reason

Apr  6 13:44:33 server postfix/smtpd[17965]: input attribute value: (end)

Apr  6 13:44:33 server postfix/smtpd[17965]: public/cleanup socket: wanted attribute: (list terminator)

==> /var/log/mail.info <==

Apr  6 13:44:33 server postfix/smtpd[17965]: public/cleanup socket: wanted attribute: (list terminator)

Apr  6 13:44:33 server postfix/smtpd[17965]: input attribute name: (end)

Apr  6 13:44:33 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250 Ok: queued as 8FD7C107F2

Apr  6 13:44:33 server postfix/smtpd[17965]: watchdog_pat: 0x809cbe8

Apr  6 13:44:33 server postfix/smtpd[17965]: < rasmus.rapanden.dk[195.249.214.150]: QUIT

Apr  6 13:44:33 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 221 Bye

Apr  6 13:44:33 server postfix/smtpd[17965]: disconnect from rasmus.rapanden.dk[195.249.214.150]

Apr  6 13:44:33 server postfix/smtpd[17965]: master_notify: status 1

Apr  6 13:44:33 server postfix/smtpd[17965]: connection closed

Apr  6 13:44:33 server postfix/smtpd[17965]: watchdog_stop: 0x809cbe8

Apr  6 13:44:33 server postfix/smtpd[17965]: watchdog_start: 0x809cbe8

==> /var/log/mail.log <==

Apr  6 13:44:33 server postfix/smtpd[17965]: input attribute name: (end)

Apr  6 13:44:33 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 250 Ok: queued as 8FD7C107F2

Apr  6 13:44:33 server postfix/smtpd[17965]: watchdog_pat: 0x809cbe8

Apr  6 13:44:33 server postfix/smtpd[17965]: < rasmus.rapanden.dk[195.249.214.150]: QUIT

Apr  6 13:44:33 server postfix/smtpd[17965]: > rasmus.rapanden.dk[195.249.214.150]: 221 Bye

Apr  6 13:44:33 server postfix/smtpd[17965]: disconnect from rasmus.rapanden.dk[195.249.214.150]

Apr  6 13:44:33 server postfix/smtpd[17965]: master_notify: status 1

Apr  6 13:44:33 server postfix/smtpd[17965]: connection closed

Apr  6 13:44:33 server postfix/smtpd[17965]: watchdog_stop: 0x809cbe8

Apr  6 13:44:33 server postfix/smtpd[17965]: watchdog_start: 0x809cbe8

```

when doing mailq:

```

-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------

318BB107E6     1439 Sun Apr  6 13:28:11  ngc@rapanden.dk

              (recipient ngk@shadowsite.net: bad uid -uid in virtual_uid_maps)

                                         ngk@shadowsite.net

30CEE10774     1440 Sat Apr  5 13:07:46  ngc@rapanden.dk

              (recipient ngk@shadowsite.net: bad uid -uid in virtual_uid_maps)

                                         ngk@shadowsite.net

8FD7C107F2     1439 Sun Apr  6 13:44:28  ngc@rapanden.dk

              (recipient ngk@shadowsite.net: bad uid -uid in virtual_uid_maps)

                                         ngk@shadowsite.net

B1E06BD87      1780 Sun Apr  6 13:05:25  ngc@rapanden.dk

              (recipient ngk@shadowsite.net: bad uid -uid in virtual_uid_maps)

                                         ngk@shadowsite.net

C0DD5107D2     1439 Sun Apr  6 13:31:27  ngc@rapanden.dk

              (recipient ngk@shadowsite.net: bad uid -uid in virtual_uid_maps)

                                         ngk@shadowsite.net

D55D0C9C9      1442 Sat Apr  5 12:30:59  ngc@rapanden.dk

              (recipient ngk@shadowsite.net: bad uid -uid in virtual_uid_maps)

                                         ngk@shadowsite.net

-- 10 Kbytes in 6 Requests.

```

The uid and gid in the mysql database is from /etc/passwd and they matchLast edited by The Shadow Surfer on Sun Apr 06, 2003 6:05 pm; edited 2 times in total

----------

## The Shadow Surfer

I tried to set chmod -R 777 /home/vmail

didn't help

----------

## vaevictus

 *The Shadow Surfer wrote:*   

> I have followed the "Virtual Mailhosting System Guide"
> 
> I don't get:
> 
> ```
> ...

 

I've been achieving this same problem, when following these docs... does anyone know what section we're screwing up? The docs say "make sure AUTH" is there, but then doesn't say what we screwed up since it's *not* there.   :Smile: 

n8

----------

## vaevictus

 *Dr_Stein wrote:*   

> Is your domain a "virtual" domain? or "local?"
> 
> It looks like postfix isn't looking at your virtual domains (which you have stored in mysql)
> 
> Are you going to ues MySQL? If not, you'll need to create an /etc/postfix/virtual file and list virtual domains in there. It's dead easy.. let me know which method you were going for, and I might be able to help. 

 

This contradiction to the manual occurs directly before Step #7: MySQL.

While we're *going* to use mysql, the manual appears to indicate we've got a problem before it's involved.

n8

----------

## vaevictus

oh heck.

I'm not sure if this is the exact problem... but it looks like *I* missed USE="SASL" when i was building postfix... I'll rebuild and let you know.

I noticed this while watching /var/log/everything/current and saw:

```

Apr  8 15:09:41 [postfix/smtpd] warning: smtpd_sasl_auth_enable is true, but SASL support is not compiled in

```

so... lesson #1, "read the directions at the beginning"

good luck, I'll let you know ...

----------

## The Shadow Surfer

 *vaevictus wrote:*   

> oh heck.
> 
> I'm not sure if this is the exact problem... but it looks like *I* missed USE="SASL" when i was building postfix... I'll rebuild and let you know.
> 
> I noticed this while watching /var/log/everything/current and saw:
> ...

 

I think that I have compiled postfix with the use=sasl but just to be sure, I recompiled... didn't help... still isn't working

----------

## vaevictus

okay ... I rebuilt postfix and that did *not* fix it. I started and stopped the thing a few times, but I think a start/stop doesn't actually perform a reload...

so I was playing with some settings and did the postfix reload, and then saw the AUTH lines!

so... make sure you do a reload...

and make sure you've got *all* the options in the USE...

```
USE="mysql imap libwww maildir sasl ssl"
```

And I've yet to mess with mysql settings at all... so...

----------

## vaevictus

 *vaevictus wrote:*   

> 
> 
> And I've yet to mess with mysql settings at all... so...

 

And now I've got success across the boards.  vhost through mysql, squirrelmail and complete delivery.  I had some fun getting SSL and PHP to play nice.

----------

## The Shadow Surfer

 *vaevictus wrote:*   

> 
> 
> so I was playing with some settings and did the postfix reload, and then saw the AUTH lines!
> 
> 

 

What settings did you play with?

----------

## vaevictus

 *The Shadow Surfer wrote:*   

>  *vaevictus wrote:*   
> 
> so I was playing with some settings and did the postfix reload, and then saw the AUTH lines!
> 
>  
> ...

 

I don't think It'll matter because they seem exactly as before...

but I was playing with the postfix main.cf settings...

reordering them and commenting some out.... reloading a lot...

but basically ... I ended up recompiling everything. after specifically changing the entries into my make.conf.

----------

## Dr_Stein

 *The Shadow Surfer wrote:*   

> This is the log when sending an email to ngk@shadowsite.net from ngc@rapenden.dk (when starting postfix: /usr/sbin/postfix -v -v start and mydomain is set to home)
> 
> tail -f /var/log/mail.{info,err,warn,log}
> 
> [code]
> ...

 

Ah ha! I think I know the problem.

Here's what you need in /etc/postfix/main.cf:

virtual_transport = virtual

virtual_minimum_uid = 1000

virtual_gid_maps = static:1001

virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf

virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf

virtual_uid_maps = static:1001

virtual_mailbox_base = /

#virtual_mailbox_limit =

Your main.cf said it had this:

virtual_minimum_uid = 1000

virtual_gid_maps = static:$vmail-gid

virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf

virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf

virtual_uid_maps = static:$vmail-uid

virtual_mailbox_base = /

#virtual_mailbox_limit = 

Notice the difference? The static:$vmail-uid is a variable that *you* need to change. The documentation fails to point that fact out. Postfix uses alot of other $stuff (like $mynetworks, $mydestination, etc) so it's kind of easy to overlook. 

I got stuck on that one for a long time.

----------

## The Shadow Surfer

Thx

----------

## Dr_Stein

Did it work?  :Smile: 

----------

## cryos

The database dump file to build all the mysql tables appears to be a 404 now  :Sad:  I'll try creating the tables myself unless anyone has a copy to hand? I've got to that point and all seems well apart from /var/lib/sasl2/smtp.conf directory not being there either - did find /usr/lib/sasl2/smtpd.conf that looks suspiciously similar and so am assuming it has moved for now!

----------

## Dr_Stein

http://www.pbp.net/~jnichols/genericmailsql.sql  - there's the SQL file! And the /var/lib/sasl2/ directory not being there? I actually just created it myself and put the smtp.conf file in there - haven't noticed any issues with it yet. 

Oh, beware when you get to the Mailman section.. there's a few gotchas there as well. I'm trying to note them in a copy of the how-to I have.. when I'm done, I'm going to send it to the author to get his opinion.

----------

## steveb

 *Dr_Stein wrote:*   

>  *The Shadow Surfer wrote:*   This is the log when sending an email to ngk@shadowsite.net from ngc@rapenden.dk (when starting postfix: /usr/sbin/postfix -v -v start and mydomain is set to home)
> 
> tail -f /var/log/mail.{info,err,warn,log}
> 
> [code]
> ...

 

you can use for the uid/gid stuff the tables in the mysql database if you want:

virtual_gid_maps                        = mysql:/etc/postfix/mysql-virtual-gid.cf

virtual_uid_maps                        = mysql:/etc/postfix/mysql-virtual-uid.cf

like this you have more flexibility.

cheers

SteveB

----------

## The Shadow Surfer

 *Dr_Stein wrote:*   

> Did it work? 

 

yes

----------

## cryos

Got most of it working now. I can authenticate from the MySQL database using IMAP/POP3 (even through SSL). Mail is being delivered by postfix as it should be using the MySQL tables. Main problem now is that the SMTP authentication is not working at all  :Sad: 

I changed all the pam.d file (imap, pop3 and smtp) as in the guide. I changed the /usr/lib/sasl2/smtpd.conf and /var/lib/sasl2/smtp.conf to read 'pwcheck_method: saslauthd' and changed main.cf as stated in the HOWTO. I have tried authenticating using several mail clients and by hand but I always get authentication failed.

Anyone got this working? It should authenticate me through the MySQL table shouldn't it? Username is the email address, and password is as set in clear field? I have looked at several guides from other sites, but couldn't find anything useful.

----------

## MoonWalker

I havn't got that far yet, but I noticed the doc say to diable cram and digest as follow

```
      # cd /usr/portage/dev-libs/cyrus-sasl

      # nano -w cyrus-sasl.$currentversion.ebuild

// Disable digest and cram as show below.

      

      econf \

            --with-saslauthd=/var/lib/sasl2 \

            --with-pwcheck=/var/lib/sasl2 \

            --with-configdir=/etc/sasl2 \

            --with-openssl \

            --with-plugindir=/usr/lib/sasl2 \

            --with-dbpath=/etc/sasl2/sasldb2 \

            --with-des \

            --with-rc4 \

            --disable-krb4 \

            --with-gnu-ld \

            --enable-shared \

            --disable-sample \

            --enable-login \

            --disable-cram \

            --disable-digest \

            ${myconf} || die "bad ./configure"

      

      # USE='-ldap -mysql' emerge cyrus-sasl

// We don't have ldap and we're not using sasl's mysql capabilities 

// so we need to turn them off for this build.

```

 but I can't see anything like this code in the ebuild (2.1.12) so I gues this and probably some others are a bit outdated to current state of ebuilds.

Also I would like to know if this setup demand the full emailaddress to be used as username in all auths or if it's just for 'none local' users to be authed with mysql?

----------

## cryos

Sorted SMTP Auth - it was due to vim splitting the smtp pam.d config lines into two! Took me ages to figure it out, and it was so simple. I have straces, used saslauthd with shadow which gave me my first clue as that worked.   :Embarassed: 

Anyway, it all works great. Postfix + SMTP Auth + TLS from MySQL. Not bothered with the mailman stuff yet - not really needed. The system does seem to be working really well.

You do use the full email address in all authentication with the servers...

----------

## MoonWalker

 *cryos wrote:*   

> You do use the full email address in all authentication with the servers...

 

yes, but on my current mailserver (postfix 1.1.x) I have it setup so all local users put their username only in the mail client and to have everybody to change that would be very combersome. This way you can't have one user account to handle several emailaddresses which is very flexable. Otherwise I like this approach, but it might be configable... well I don't know, have to dig into it but if anyone know it's a no go it would save a lot of strife I guess?

----------

## MoonWalker

When issue

```
# ./CA.pl -sign

```

I get the following error

```
merc misc # ./CA.pl -sign  

Using configuration from /etc/ssl/openssl.cnf

Enter PEM pass phrase:

phrase is too short, needs to be at least 4 chars

Enter PEM pass phrase:

unable to load CA private key

27127:error:06065064:digital envelope routines:EVP_DecryptFinal:bad decrypt:evp_enc.c:277:

27127:error:0906A065:PEM routines:PEM_do_header:bad decrypt:pem_lib.c:455:

Signed certificate is in newcert.pem
```

Is this normal? I just hit enter for blank passwd as I understood the doc as this...

----------

## MoonWalker

I think I found a bug in the doc

```
      # create a certificate

      system ("$REQ -new -nodes -x509 -keyout newreq.pem -out newreq.pem $DAYS");

```

I think have to be

```
      # create a certificate

      system ("$REQ -new -nodes -x509 -keyout newcert.pem -out newcert.pem $DAYS");

```

----------

## ghetto

Hi, wow im glad to find this thread, ive been butting my head against the wall for two days.. 

Im following the virtual mailhost document, but Im using an unstable system so that means postfix-2.0.10 apache2 squirlmail-1.4 fetchmail-6.2 and php-4.3.2

I dont actually ANY need virtual hosts (for the moment) I just have a single hostname that I am using dyndns to redirect to my box. I just want to have a webmail account for family and friends with aliases for local users on my box so that they can ssh to the box and check their mail with mutt if they like. And I also want to set up a couple mailing lists.

I have fetchmail working fine, and it seems that postfix is also working because I can use mutt to SEND and RECIEVE email using my dyndns redirect name, and it arrives at my box just fine.

MY MAIN PROBLEM IS WITH SQUIRLMAIL!! 

I can login into squirrelmail using an alias that I have setup with phpmyadmin for each of my local users. 

HOWEVER I cant send ANY email using squirlmail.  When I try to send email through Squirlmail the mail client just hangs. Then after about five minutes it says "ERROR:" but doesnt actually give the specific error message.

The only part of the document that I cant seem to get working is Code Listing 6.2    

...am I suppost to substitute my dyndns name for "mail.domain.com"?

or am I just suppost to type exactly what it says..

# telnet localhost 25

Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'

and then what?!? It doesnt seem very clear but maybe Im just tried..

Can anyone please sudgest something for me to check, I would really love to get squirrelmail working! 

Thanks =)

----------

## stimpy

You type in the blue commands in the 6.2 listing, IE. EHLO <your.domain>

The SMTP server then responds back with (hopefully) similar stuff to the rest of listing 6.2

(EHLO is one of the SMTP commands. It's basically about "hello; are you there; what do you do" type of thin - if my memory from years ago servers...)

Use this to test that your SMTP server is actually listening.

----------

## ghetto

Thanks, thats what I thought I was suppost to do, but it didnt work and I

noticed that the instructions werent exactly clear so I thought mabye I was

making undue assumptions..

so i guess it just means my smtp server wasnt working properly.

----------

## rdx

great thread   :Very Happy: 

i've got another issue since couple of days and some people are stressing me because they want their mail back.. i switched the mail stuff to gentoo now, all works well, see this this topic .

question how can i influence postfix to chmod my files inside the maildir's to rw-rw-rw, not only rw------- ?   :Question:   :Rolling Eyes: 

squirrelmail and all other daemons can't read incoming mails, but they get delivered allright..   :Surprised: 

any solution for this? it's very urgent   :Shocked: 

[--edit--]

problem solved! i'm stupid, i forgot to change uid/gid when i moved the user to virtual..  :Wink:  sorry...!

[--edit--]

----------

## ghetto

I cant get any of my local users to authenticate, can someone who has gotten this to work perhaps pass on a few tips, to the best of my knowledge everything should be working fine, but obviously its not.

However the imap server is working now since i can log in with telnet and i get the expected response.

So I think the issue is either sasl or maybe mysql Im not sure.

----------

## rdx

would be helpful if you post the output of /var/log/mail.log which gets written during the login process..

if you have something like

 *Quote:*   

> Jun  6 11:31:40 cypress postfix/smtpd[28666]: dict_mysql_lookup: retrieved 1 rows

 

it should not be mysql..

get sure you have the verbose flag for smtpd activated in /etc/postfix/master.cf

 *Quote:*   

> smtp      inet  n       -       n       -       -       smtpd -v

 

----------

## ghetto

Thanks for the reply, however I have it working now.

I dumped the virtmail host guide though, its more than I need and the doc is getting out of date.

Heres the guide that got me setup if your interested.

https://forums.gentoo.org/viewtopic.php?t=56633&postdays=0&postorder=asc&start=0

----------

## rdx

thanks for the ref,  but i really need virtual hosting   :Very Happy:  even if i only host mx for six doms only   :Sad: 

well, i'll try to implement procmail (saw it in the ref) now, don't know how to do that actually without using fetchmail.. any hints?!

----------

## iceberg

 *MoonWalker wrote:*   

> I think I found a bug in the doc
> 
> ```
>       # create a certificate
> 
> ...

 

Perhaps you shoud do an "ls" figure out that demoCA doesn't belong there and rm -rf it... your "bug" is not in fact a bug, it's a matter of the user not googling for the proper answer, if i've replied to this and someone else has said the same thing, i apologize, but you might want to look at the particular error you're getting and THEN google for that (upon the ./CA.pl -sign perhaps?)

referencing users@openssl mailing list:

from openssl mail archives

----------

## taskara

on a simlar issue, I emerged openssl and re ran 

```
 ./CA.pl -newca
```

it asks me  *Quote:*   

> CA certificate filename (or enter to create)

  I just press enter.

then it continues asking  *Quote:*   

> Making CA certificate ...
> 
> Using configuration from /etc/ssl/openssl.cnf
> 
> Generating a 1024 bit RSA private key
> ...

 

if I just press "enter" it says  *Quote:*   

> Enter PEM pass phrase:
> 
> Verifying password - Enter PEM pass phrase:
> 
> phrase is too short, needs to be at least 4 chars
> ...

 

what do I put in for the PEM pass phrase ?

stops beating head on wall to say "many thanks!!"  :Smile: 

----------

## yumbrad

The PEM pass phrase protects the certificate.  It's used to prevent modifications to the certificate unless the pass phrase is known.  I just made mine the same as one of my other passwords - it'll prompt you for it when performing certificate operations...  you just can't leave it blank.

----------

## taskara

thanks.. I put in my usual password, and continued.

cheers  :Smile: 

----------

## BumptiousBob

I am having the same problem mentioned earlier in the thread.  I built everything according to specification (USE variables proper etc) and watched postfix build in sasl support etc.   Here is the output from a telnet into port 25 of my SMTP server:

```

Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'.

220 snapg.com ESMTP Postfix

EHLO snapg.com

250-snapg.com

250-PIPELINING

250-SIZE 10240000

250-VRFY

250-ETRN

250-STARTTLS

250-XVERP

250 8BITMIME

```

As you can see, it's missing the two critical AUTH login plain lines that tell me that SMTP Auth is available.  I have rebuilt everything to be sure, to no avail.  I started from scratch with the guide and had this from the very beginning.  

Also, although it doesn't have much to do with anything, receiving mail works just fine via the mysql stuff detailed later on, but for the life of me I can't get SMTP auth to work!   Here is the sasl part of my main.cf:

```

smtpd_sasl_auth_enable = yes

smtpd_sasl2_auth_enable = yes

smtpd_sasl_security_options = noanonymous

broken_sasl_auth_clients = yes

smtpd_sasl_local_domain=

smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination

smtpd_use_tls = yes

smtpd_tls_auth_only = yes

smtpd_tls_key_file = /etc/postfix/newreq.pem

smtpd_tls_cert_file = /etc/postfix/newcert.pem

smtpd_tls_CAfile = /etc/postfix/cacert.pem

smtpd_tls_loglevel = 3

smtpd_tls_received_header = yes

smtpd_tls_session_cache_timeout = 3600s

tls_random_source = dev:/dev/urandom

```

and smtpd.conf in both /etc/sasl2/ and /usr/lib/sasl2

```

pwcheck_method: saslauthd

mech_list: LOGIN PLAIN

```

I also noted that TLS works just fine, in the logs I can see it successfully establish the ssl connection, but it basically ignores my clients requests to do SMTP AUTH.

Any information would be very appreciated   :Very Happy: Last edited by BumptiousBob on Sat Jun 28, 2003 2:24 pm; edited 1 time in total

----------

## taskara

I have the same issue atm  :Sad: 

----------

## BumptiousBob

 *taskara wrote:*   

> I have the same issue atm 

 

 :Laughing: 

Laughing is all I can do at this point, I spent most of the afternoon tinkering trying to fix this...I'll be sure to post if I figure anything out!

----------

## BumptiousBob

Well I have noticed on a postconf that smtpd_sasl_auth_enable "yes" and smtpd_sasl2_auth_enable it says is not a valid flag.  I will look into building issues some more, and also turn on verbose mode to see if I can get any warnings about the config option switch in the logs.  

 :Shocked: 

----------

## taskara

cool - keep us updated  :Wink: 

----------

## karl420

If anyone can help, please check out this topic:

https://forums.gentoo.org/viewtopic.php?t=65018

Thanks,

Karl

----------

## Holly

i still have some problems with postfix, after reading this thread.

i think pop and imap are working fine, but postfix doesn't deliver mails:

```
Jul  6 21:23:58 [postfix/smtpd] resolve_clnt_query: `holly@deepthought.phren.net' -> t=`local' h=`deepthought.phren.net' r=`holly@deepthought.phren.net'

Jul  6 21:23:58 [postfix/smtpd] ctable_locate: install entry key holly@deepthought.phren.net

Jul  6 21:23:58 [postfix/smtpd] maps_find: recipient_canonical_maps: holly@deepthought.phren.net: not found

Jul  6 21:23:58 [postfix/smtpd] maps_find: recipient_canonical_maps: holly: not found

Jul  6 21:23:58 [postfix/smtpd] maps_find: recipient_canonical_maps: @deepthought.phren.net: not found

Jul  6 21:23:58 [postfix/smtpd] mail_addr_find: holly@deepthought.phren.net -> (not found)

Jul  6 21:23:58 [postfix/smtpd] maps_find: canonical_maps: holly@deepthought.phren.net: not found

Jul  6 21:23:58 [postfix/smtpd] maps_find: canonical_maps: holly: not found

Jul  6 21:23:58 [postfix/smtpd] maps_find: canonical_maps: @deepthought.phren.net: not found

Jul  6 21:23:58 [postfix/smtpd] mail_addr_find: holly@deepthought.phren.net -> (not found)

```

the mysql-connection works as i can see in the syslog. mails to deepthought.phren.net should be delivered "local", not "virtual".

----------

## karl420

When I connect to my the imap server with my client, it says 

 *Quote:*   

> "Server unexpectedly disconnected: Operation now in progress"

 

(this is with evolution -- it says something similar with outlook, but I don't remember, it doesn't really matter). 

This shows up in the logs on the server:

```
Jul  7 20:32:54 gentoo imapd: Connection, ip=[68.32.97.220]

Jul  7 20:32:54 gentoo imapd: chdir: Permission denied

```

Anyone know what I'm doing wrong so I can slap myself?

Karl Haines

----------

## karl420

I got it working, I had forgetten some import configs! All is well, thanks to everyone who helped me!

Karl

----------

## troopern

Right now my mind boggles me about this. What is it that I've done wrong ?

```
Aug 20 15:53:18 mail postfix/virtual[6130]: 3AA97280C6: to=<test@mail.troopern.net>, relay=virtual, delay=521, status=deferred (maildir delivery failed: create ///home/vmail/mail.troopern.net/test/tmp/1061387598.P6130.mail.troopern.net: Permission denied)
```

Any solutions I can get is a good solution.

And by the way, postfix did not create the dir itself.

Why didn't posftix do that ?

----------

## kashani

Postfix will only create from the .maildir/ on down. So if the user dir itself does not exist you will need to create it. 

mkdir -p /home/vmail/mail.troopern.net/$user

chown -R vmail. /home/vmail/

make sure your database lists the maildir as the following complete with trailing slash.

/home/vmail/mail.troopern.net/$user/.maildir/

kashani

----------

