Is possible to set external mail alias?

I think there’s no doc about it.

That method returns the account name (if I remember correctly, in the past it was names, for groups) associated to an email address.

Mail forwards and group expansion is implemented by /etc/postfix/aliases.

so mine solution is wrong… :smiley:

seriously, in my aliases I see:

#
# 40accounts -- ensure local delivery for our accounts
#
slfusr1          slfusr1
slfusr2          slfusr2
slfusr3          slfusr3
zamboni          zamboni

I repeat, I don’t know postfix… should/could I work here?

On the right column you can write an external mail address (forward) or other account names (group expansion), separated by comma.

The “same name of the left column” form overrides the lookup on /etc/aliases file.

@davidep, did you read this one (the answer, in the 3ad)

I’m quite busy, now :frowning:

I’ll surely read it, I’m very interested on this kind of configuration! Please, be patient :pray:

It could be done like a next mx record, but for this @mdv say do u need to login with external account for sending mail , or where external account mail should handle… so if you dont want to login like external use mail aliases as well

the solution I posted does not work

@mdv: don’t hack your server, I’m doing some tests/research

if/when I’ll find a working solution, I’ll post here

please don’t hold your breath :slight_smile:

ok, now I read it!

I think it should be possible to do the same from the Server Manager. The example from virtualmin.com could be implemented with Users > Edit > Services > Forward messages > Email address. It changes the /etc/postfix/aliases right column, so no need for templates-custom.

However - let me say - it’s a mess! POP, forwards, multiple relay domains, MX records… I would not like to manage similar environments! :chart_with_downwards_trend:

As @alefattorini said above, we lack multi-office support. To have it, we need to modify a lot of stuff. Assuming a single PDC domain on different offices the list could be:

  • getent()-based Users/Groups module
  • multi-branch LDAP DIT layout
  • mail server tables from LDAP

I’d like to work on it, but also NethServer 7 is on the roadmap…

:smiley: But I don’t want think about it now: I’m going on vacation, next week :octopus:

@mdv post real technical specification that You need , maybe even graphically with login from inside and outside , try to help you

OP already told us what he need in a enough clear example (re-read his last post)…
something called (as @davidep says above) multi-office or, using another terminology, an hub-spokes setup

I agree with davide that OP’s solution is a mess… with the correct hub-spokes setup, no need for external (ISP) email mailbox and pop3 collector

I did some test yesterday, two ns machines, same domain, different hostnames, all mail and dns stack installed and I come to your conclusion, we can use the forward filed/feature

I saw mail from userc (on server 2) going to usera (on server 1) but all I get is a denied message.

forward address is in the usera@server1.domain.tld form and server1.domain.tld is defined in dns hosts section

I lack some info about postfix… is there anyone interested in digging in?

Yep forward it is not that you need

ok… would you mind to elaborate a bit and give some kind of examples and a POC (Proof Of Concept)?

thank you

so in /etc/postfix/main.cf
add virtual_alias_maps = hash:/etc/postfix/mail_alias
smtpd_sender_login_maps = hash:/etc/postfix/mail_alias

in /etc/postfix/mail_alias as is posted
greyb@purpoleapple.com greyb@domain.local

shufflel@purpoleapple.com shufflel@doman.local

lightbulbm@purpoleapple.com lightbulbm@domain.local

tannerj@purpoleapple.com mail.office2.purpoleapple.com

screwups@purpoleapple.com mail.office2.purpoleapple.com

funt@purpoleapple.com mail.office2.purpoleapple.com

then run postmap /etc/postfix/mail_alias
and run service postfix restart
and in other server do the same except addresses

2 Likes

Ok, sounds interesting
Now, a little task for you:
Re think it in terms of custom fragments :wink:

Test this feature then i’l try to make template-custom.

I’m sorry, my friend :slight_smile:
It’s up to you :slight_smile:

Inviato da Samsung Mobile

i need you to test feature first , coz u have domain and 2 servers already done. confirm that my suggestion work, then I add it into e-smith

I don’t need a working solution, I need you to try… gimme the fragments, I’ll put them into my test environment and report back…

come on, don’t be shy

TIA

It smells like monkey work, but ok on weekend i’l make it

1 Like