Alias to forward mail to all addresses for a domain using Exim

I’m using Exim v4.91 in a CentOS 7 server hosting more than one domain and I’d like to set up a group address/alias to forward mail messages to all addresses of a given domain (one for every domain). I.e. if I send an email to everyone@example.com it would be sent to *@example.com, all email to everyone@example2.com should be sent to *@example2.com, etc.

I’ve found how to set up catch-all aliases but what I want to achieve is the opposite, not an alias to receive all incoming messages but a forward-to-all-accounts all incoming messages.

Using The + Alias In G-Mail

I recently started using the + symbol method in GMail to set up multiple accounts relating to my personal email address (social , personal , work , etc), and now I want to use the same method for my business.

But, I’m wondering how to format my emails properly as I have some sub-divisions under my parent business. Is it possible to use multiple + symbols, or is it best to use a . or a -?

I’ll give an example:

business@gmail.com // Main Business Email  business+subdivision@gmail.com // Sub Division Email  business+subdivision+contact@gmail.com business+subdivision-contact@gmail.com business+subdivision.contact@gmail.com 

Any recommendations as to which can, or should be used?

Postfix How to send mail in behalf of an alias

I’m using postfix as a mail relay in a very simple setup, mostly with aliases, forwarding mails to GMail.

My main goal with this is to minimize the need for mailboxes on my server.

Let’s assume I have the following alias

bob@mydomain.tld -> bob@gmail.com 

I would like to redirect/forward all incoming mail for bob@mydomain.tld to the GMail account bob@mydomain.tld. That’s the easy part.

Now for all outgoing mail sent by bob@mydomain.tld GMail offers me the feature to send mails in behalf of a different account in the settings.

However, in order for this to work, GMail needs to be able to login via SMTP for bob@mydomain.tld, which is just an alias.

Is there a way to forward incoming mails with an alias by still being able to send mails via SMTP/SASL?

Postfix How to send mail in behalf of an alias

I’m using postfix as a mail relay in a very simple setup, mostly with aliases, forwarding mails to GMail.

My main goal with this is to minimize the need for mailboxes on my server.

Let’s assume I have the following alias

bob@mydomain.tld -> bob@gmail.com 

I would like to redirect/forward all incoming mail for bob@mydomain.tld to the GMail account bob@mydomain.tld. That’s the easy part.

Now for all outgoing mail sent by bob@mydomain.tld GMail offers me the feature to send mails in behalf of a different account in the settings.

However, in order for this to work, GMail needs to be able to login via SMTP for bob@mydomain.tld, which is just an alias.

Is there a way to forward incoming mails with an alias by still being able to send mails via SMTP/SASL?

Split server into two virtuals, but can’t set cgi-bin alias right

So despite having zero experience with the server side, I split my dedicated Ubuntu 18.04 server into two virtual servers. One for example.com and the other for x.x.x.x

Originally both had access to the same cgi-bin, which I did not want.

So in the x.x.x.x.conf file I added

ScriptAlias /cgi-bin/ /var/www/x.x.x.x/public_html/cgi-bin/     <Directory "/var/www/x.x.x.x/public_html/cgi-bin">         AllowOverride None         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch         Order allow,deny         Allow from all     </Directory> 

Then I restarted apache, but now I can’t reach the cgi-bin folder at all

The access log says:

“GET /cgi-bin/prl.pl?b=1 HTTP/1.1” 500 803 “-“

The error:

[cgid:error] [pid 560:tid 140643013695232] [client x.x.x.x:50568] End of script output before headers: prl.pl

My uneducated guess makes me think it’s a bad alias. If anyone can help me I would so appreciate it.

Thanks

postfix + rspamd: postfix does not resolve virtual alias

I have a postfix mail server based on Arch Linux.

I used the usual configuration: mysql virtual_* (mailbox, alias, domain) and amavisd filtering (content_filter = smtp-amavis:[127.0.0.1]:10024).

I would like to try the rspamd and I think I’ve set everything right.

I use the following settings in Postfix:

#MILTER milter_default_action = accept milter_protocol = 6  smtpd_milters = inet:127.0.0.1:8891 inet:127.0.0.1:11332 non_smtpd_milters = inet:127.0.0.1:8891 milter_mail_macros =  i {mail_addr} {client_addr} {client_name} {auth_authen} 

rspamd local.d/worker-proxy.inc

bind_socket = "127.0.0.1:11332"; milter = yes; timeout = 120s; upstream "local" {     default = yes;     self_scan = yes; } 

When I turn off postfix content_filter option (do not have amavis filtering), postfix does not resolve the RCPT TO (alias envelope recipient) value with the virtual table, so redirects do not work:

if I send an email to somebody@domain.hu, which is a virtual alias and would be redirected to somebody2@domain.hu, this recipient expand will not occur when there is no content_filter and rspamd is set based on smtpd_milters.

However, if I switch back to content_filter, so rspamd and amavis will filter together, there is no problem.

The recipient expand task is theoretically done by the postfix cleanup process.

Otherwise rspamd works: filter from command line, web interface, and milter.

I just don’t understand.

Create alias with oh my zsh

Bit confused here, within the ~/.zshrc file I have specified the following:

# Set personal aliases, overriding those provided by oh-my-zsh libs, # plugins, and themes. Aliases can be placed here, though oh-my-zsh # users are encouraged to define aliases within the ZSH_CUSTOM folder. # For a full list of active aliases, run `alias`. # # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" alias burp="java -jar -server -Xms1048m -Xmx2G -XX:-DisableExplicitGC -XX:+UseT$   alias htb="openvpn /root/example.ovpn" alias webgoat="java -jar /root/webgoat-container-7.0-SNAPSHOT-war-exec.jar" alias cl="clear" 

However whenever i try to run any, even cl i receive:

zsh: command not found: cl 

I know there is many many posts about this subject but as far as I can tell I have followed the configuration correctly. Would really appreciate if someone can point out where i’ve gone wrong.

Thanks!

Also not sure if its relevant but i’m running on Kali Linux.