vastbots.blogg.se

Linux mail forward
Linux mail forward







linux mail forward

# run program1.sh if the extension is "address1"

linux mail forward

For example, this shell script will run different programs depending on the EXTENSION: forward file invoke a script that runs other scripts as appropriate. If you need to run different programs for different addresses, you can make your. forward file can use that value to decide what action to take.

  • forwards to forwards to will cause the EXTENSION environment variable to be set to "address1" or "address2", and the program executed by the.
  • For example, you could set up two forwarding addresses in the Web hosting control panel as follows: One solution is to use the address extension trick mentioned in the Postfix local delivery agent documentation to set an environment variable. However, you can work around that limitation quite easily if you need to have multiple incoming addresses handled differently. mbox file in your home directory for some reason:Įach domain name only has one Unix user ID on our servers, meaning you can only have one. If you prefer to save your mail messages as a. |/var/If the command to run the program contains spaces, be sure to enclose the whole thing in quotes: Or this to run a program in your website's cgi-bin folder: Other common entries might include this one to run procmail: Make sure the program is "executable" to avoid "permission denied" errors. then the program named "mailprog.sh" would run from your home directory each time mail arrived. forward file containing commands (it must be a regular file, not a symlink).įor example, if the.
  • Make one of the destinations of the forwarding address be the special address Place a.
  • Login to the account management control panel.
  • You can use the account management control panel to direct incoming mail for any address to the Unix local delivery agent for your account (we use the Postfix local delivery agent). Enter your domain name in the box above to see examples that include your domain name and the correct paths for your account. IMPORTANT: The examples below are generic. forward files or the concept of "piping email to an external command", you probably shouldn't do this. Note that this is an advanced technique that we don't provide direct assistance with beyond the instructions below if you aren't familiar with Unix. This allows you to run a program to handle an email message every time mail arrives for a certain address. Technically advanced users can deliver their email via Unix. Consider using Sieve filtering instead, which is a simpler and safer way to filter mail on the server.

    linux mail forward

    These instructions are not recommended for most users.









    Linux mail forward