Mail server and smarthost

everyone, I would first like to say that there are about 3 months I’m
studying intensively Nethserv and I was pleasantly impressed by the
strength and the quality that this distribution offers. sincere congratulations to the developers.
having said that I would like to ask for help on a question that I can not fix. should I create a local mail server to handle 3 domains:, I
wish I could teach Nethserv to download mail from remote and at the
same time does not keep them on remote servers to guarantee the free
space in the provider’s server. I thought to manage mail through the POP3 connector and then create local accounts are configured imap to the local server.
the domain can handle both inbound and outbound through the smarthost,
here the problems begin as I can do to get them to send through the
domains, I wanted to see if it is correct while
managing mail
for as I thought, then I wanted to see if there are any special rules
to manage aruba domains and if it were possible to create multiple smart
host to handle all three domains. I could use Nethserv as SMTP servers of all 3 domains avoiding the use smarthost? if you like I do? thank you so much!

Probably you can do something some magic with a custom template, but I think you will always have some troubles.
IMHO you should use aruba and libero web interface to correctly manage their mail messages.

@support_team anyone has some suggestions on this?

Maybe this howto:

Good evening to all and thanks for the answers, but wanting to follow the manual that I posted filippo_carletti, already at the first line I get an error after giving the command: vi / etc / e-smith / templates-custom / etc / postfix / main .cf / 90smarthosts_accounts, we press the “i” key to enter #

90smarthosts_accounts (template-custom)


smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash: / etc / postfix / relaymaps
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash: / etc / postfix / sasl_passwd
smtp_tls_policy_maps = hash: / etc / postfix / tls_policy

Some providers only authentication via plain text

smtp_sasl_security_options = noanonymous

later I press the “ESC” key right after I write:: x but I get an error on the part of you (the first time I use you as editor, I always used nano) the error is this: "etc / postfix / main. cf / 90smarthosts_accounts "E212: Can not open file for writing

if I try to use nano, I am warned that the file does not exist, where am I wrong?

thanks for your patience.

I think it throws the error because the file(path) does not exist.

You can do it by creating the directory, then the file:

mkdir -p /etc/e-smith/templates-custom/etc/postfix/
nano /etc/e-smith/templates-custom/etc/postfix/

or shorter:

mkdir -p /etc/e-smith/templates-custom/etc/postfix/ && nano “$_/90smarthosts_accounts”

where && will allow the second command to be executed only if the first command is successful, and $_ will return the last argument of the previous command (in this case: /etc/e-smith/templates-custom/etc/postfix/

You can use your preferred editor. :wink:

thanks for the answer, usually, using nano with the syntax # nano / etc / file file was automatically created if it did not exist it is normal to behave well 'or is it a peculiarity of Nethserv?
thank you so much

Sorry guys, but arrived at the command: expand-template / etc / postfix / relaymaps, I get: ERROR: No templates were found for / etc / postfix / relaymaps.
at / sbin / e-smith / expand-template line 45
the path should be: / etc / e-smith / templates-custom / postfix / relaymaps /? thank you!!

Always remember that NethServer 6.7 is like CentOS 6.7, we do not change CentOS behaviour.
Please follow Marc advice and mkdir /etc/e-smith/templates-custom/etc/postfix/
Then use nano or your preferred editor.
The path of expand-template is always the destination file, the wiki is correct.
More background on the template system (which lives on top of CentOS):

thank you very much for the detailed explanation of 'the issue, thanks again!

It’s normal behaviour.
nano and other editors will create the new file on existing directories.
Some editors, like vim, can use plugins to auto-create the non-existing parent directories.

1 Like

@p.mall Happy to know you resolved. Can you mark this topic as solved?