"Nur empfangen" Mailaccount
"Nur empfangen" Mailaccount
ich habe eine spezielle Domain reserviert von der ich nur erlauben möchte, dass eingehende Mails an eine andere weitergeleitet werden. Der Nutzer soll nicht von dieser Emailadresse bzw. Domain senden können. Gibts da von KH aus eine Möglichkeit das umzusetzen ?
- Jolinar
- Community Moderator
- Posts: 3829
- Joined: Sat 30. Jan 2016, 07:11
- Location: Weimar (Thüringen)
- Contact:
Re: "Nur senden" Mailaccount
viewtopic.php?t=13415
Data Collector für Community Support
___
Ich verwende zwei verschiedene Schriftfarben in meinen Beiträgen /
I use two different font colors in my posts:
- In dieser Farbe schreibe ich als Moderator und gebe moderative Hinweise oder begründe moderative Eingriffe /
In this color, I write as a moderator and provide moderative guidance or justify moderative interventions - In dieser Farbe schreibe ich als Community Mitglied und teile meine private Meinung und persönlichen Ansichten mit /
In this color, I write as a community member and share my personal opinions and views
Re: "Nur empfangen" Mailaccount
Re: "Nur empfangen" Mailaccount
Klappt aber auch nur wenn sonst keine andren Accounts auf dem Server sind..
Fezzi
Everyone can do something, no one can do everything.
Re: "Nur empfangen" Mailaccount
Re: "Nur empfangen" Mailaccount
Warum ?
Re: "Nur empfangen" Mailaccount
https://www.postfix.org/postconf.5.html ... strictions
Ansonsten bin ich bei dem Thema auch raus, da ich diesen Fall so nicht habe.
Re: "Nur empfangen" Mailaccount
In Postfix, you can restrict an email address or user from sending emails by using access control mechanisms in the Postfix configuration. Here's how you can set it up:
### 1. Use `smtpd_sender_restrictions`
Postfix allows you to define rules to control which senders are allowed or denied. To restrict sending emails for a specific address, you can use the `smtpd_sender_restrictions` parameter in the Postfix configuration.
#### Steps:
1. **Edit the Postfix Main Configuration File:**
Open the Postfix main configuration file, usually located at `/etc/postfix/main.cf`, with a text editor of your choice:
```sh
sudo nano /etc/postfix/main.cf
```
2. **Add or Modify `smtpd_sender_restrictions`:**
Add or update the `smtpd_sender_restrictions` parameter to include a reference to a new file where you will specify the restrictions. For example:
```plaintext
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access
```
3. **Create or Edit the `sender_access` File:**
Create or edit the file specified in the `smtpd_sender_restrictions` parameter, which in this case is `/etc/postfix/sender_access`:
```sh
sudo nano /etc/postfix/sender_access
```
4. **Add Restriction Rules:**
Add a rule to block sending for the specific email address. For example, to block `user@example.com`:
```plaintext
user@example.com REJECT
```
5. **Update Postfix with the New Access File:**
After modifying the `sender_access` file, you need to hash the file and reload Postfix:
```sh
sudo postmap /etc/postfix/sender_access
sudo systemctl reload postfix
```
### 2. Using `smtpd_recipient_restrictions`
Alternatively, you can use `smtpd_recipient_restrictions` to block specific senders if your setup uses that parameter.
#### Steps:
1. **Edit the Postfix Main Configuration File:**
Open the Postfix main configuration file:
```sh
sudo nano /etc/postfix/main.cf
```
2. **Add or Modify `smtpd_recipient_restrictions`:**
Add or update the `smtpd_recipient_restrictions` parameter:
```plaintext
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient_access
```
3. **Create or Edit the `recipient_access` File:**
Create or edit the file specified in the `smtpd_recipient_restrictions` parameter:
```sh
sudo nano /etc/postfix/recipient_access
```
4. **Add Restriction Rules:**
Add a rule to block sending for the specific email address:
```plaintext
user@example.com REJECT
```
5. **Update Postfix with the New Access File:**
Hash the file and reload Postfix:
```sh
sudo postmap /etc/postfix/recipient_access
sudo systemctl reload postfix
```
### Summary
By using either `smtpd_sender_restrictions` or `smtpd_recipient_restrictions`, you can effectively block a specific email address from sending messages. Ensure you adjust your configuration based on whether you want to block sending globally or for specific users. Always reload Postfix after making changes to ensure that your new settings take effect.
Fezzi
Everyone can do something, no one can do everything.
Re: "Nur empfangen" Mailaccount
Hab es auch mit alias@domain.tld versucht. laut dem Beitrag sollten auch Domains gehen, aber scheinbar gehts über PHP dann dennoch, habs über roundcube getestet: https://serverfault.com/questions/46372 ... lar-domain
Re: "Nur empfangen" Mailaccount
Für PHP muss du in den PHP-Einstellungen " disable_functions = mail " erweitern / hinzufügen.xeppel wrote: ↑Wed 4. Sep 2024, 12:51Hab es auch mit alias@domain.tld versucht. laut dem Beitrag sollten auch Domains gehen, aber scheinbar gehts über PHP dann dennoch, habs über roundcube getestet: https://serverfault.com/questions/46372 ... lar-domain