# Untrapped exception in pythonfilter

**URL:** https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323
**Category:** Technical assistance
**Created:** [September 18, 2020, 2:32pm UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323 "2020-09-18T14:32:38Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Tealk](https://community.zammad.org/user_avatar/community.zammad.org/tealk/32/3249_2.png) [@Tealk](https://community.zammad.org/u/Tealk)
#### Post date: [September 18, 2020, 2:32pm UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323/1 "2020-09-18T14:32:38Z")

</div>

Since on Github it was meant to be no bug, I try it here.

- Used Zammad version: 3.4.x
- Used Zammad installation source: package
- Operating system: Debian 10
- Browser + version: FF 80.0.1

### Expected behavior:

- Registering an SMTP mail server

### Actual behavior:

- The Error message: 451 4.3.0 pymilter: untrapped exception in pythonfilter

### Steps to reproduce the behavior:

- Entering mail data in e-mail notifications in the same way as for e-mail accounts  
 ![image](https://community.zammad.org/uploads/default/original/2X/a/a046e38e15c85225a5ed30f8c38772e969b7cb0e.png)  
I only get this error when I enter the mail server at “E-Mail Notification”, but when I enter the same server with the same data at “E-Mail Accounts”, I don’t get an error message:  
 ![image](https://community.zammad.org/uploads/default/original/2X/f/f074f3aa97fa41656712cee06f960e717abbc393.png)

---

<div class="post-metadata">

### Author: ![rosscdh](https://community.zammad.org/user_avatar/community.zammad.org/rosscdh/32/3238_2.png) [@rosscdh](https://community.zammad.org/u/rosscdh)
#### Post date: [September 18, 2020, 3:34pm UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323/2 "2020-09-18T15:34:25Z")

</div>

afaik zammad is a rails based project no python involved.

What you are probably seeing is the error from the remote smtp server?

---

<div class="post-metadata">

### Author: ![Tealk](https://community.zammad.org/user_avatar/community.zammad.org/tealk/32/3249_2.png) [@Tealk](https://community.zammad.org/u/Tealk)
#### Post date: [September 18, 2020, 3:36pm UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323/3 "2020-09-18T15:36:15Z")

</div>

why should the remote server display an error on “E-Mail Notification” but not on “E-Mail Accounts”?

---

<div class="post-metadata">

### Author: ![rosscdh](https://community.zammad.org/user_avatar/community.zammad.org/rosscdh/32/3238_2.png) [@rosscdh](https://community.zammad.org/u/rosscdh)
#### Post date: [September 18, 2020, 3:38pm UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323/4 "2020-09-18T15:38:01Z")

</div>

probably a different email handler, dont know I’m new here too.

Are you very sure the user/pass is exactly the same?

> <https://github.com/zammad/zammad/blob/develop/app/controllers/channels_email_controller.rb>

---

<div class="post-metadata">

### Author: ![Tealk](https://community.zammad.org/user_avatar/community.zammad.org/tealk/32/3249_2.png) [@Tealk](https://community.zammad.org/u/Tealk)
#### Post date: [September 18, 2020, 3:42pm UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323/5 "2020-09-18T15:42:47Z")

</div>

yes i am 100% sure, i have use Copy/Past

---

<div class="post-metadata">

### Author: ![rosscdh](https://community.zammad.org/user_avatar/community.zammad.org/rosscdh/32/3238_2.png) [@rosscdh](https://community.zammad.org/u/rosscdh)
#### Post date: [September 18, 2020, 3:42pm UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323/6 "2020-09-18T15:42:53Z")

</div>

its most likely the `result = EmailHelper::Probe.outbound(params, email)`

which seems to get called in notifications only, yep 99% sure thats it… so it is probing your remote server which is a python service and its not been configured correctly. So best contact the provider

---

<div class="post-metadata">

### Author: ![Tealk](https://community.zammad.org/user_avatar/community.zammad.org/tealk/32/3249_2.png) [@Tealk](https://community.zammad.org/u/Tealk)
#### Post date: [September 18, 2020, 3:48pm UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323/7 "2020-09-18T15:48:04Z")

</div>

Ok I asked the provider once, even if I do not understand it.

---

<div class="post-metadata">

### Author: ![MrGeneration](https://community.zammad.org/user_avatar/community.zammad.org/mrgeneration/32/9260_2.png) [@MrGeneration](https://community.zammad.org/u/MrGeneration)
#### Post date: [September 22, 2020, 10:03am UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323/8 "2020-09-22T10:03:27Z")

</div>

Welcome to the Community.

I see that you’re using a netcup mail server apart a custom mail server.  
Not sure if this also fits the email server you provided in above configuration.

After having a search for above mentioned error message, I quite directly ended up on the [netcup forum](https://forum.netcup.de/anwendung/imap-pop3/12260-the-mail-server-responded-451-4-3-0-pymilter/?pageNo=2) (german).

To make it short:  
The issue another user had was that the user was using a different email address from the user he authenticated. It seems like netcup is picky about such situations.

So:  
Ensure that your outgoing mail address is correct.  
As you’re configuring a notification channel in this case, **by default** your notification sender will be `noreply@{your-zammad.fqdn}`. This may not always be fitting and may need adjustment.

You can find further information regarding this topic here:

- [https://admin-docs.zammad.org/en/latest/channels/email/settings.html](https://admin-docs.zammad.org/en/latest/channels/email/settings.html)

I also noticed that the docs aren’t clear enough about above fact which is why I currently am preparing an enhancement on this.

---

<div class="post-metadata">

### Author: ![Tealk](https://community.zammad.org/user_avatar/community.zammad.org/tealk/32/3249_2.png) [@Tealk](https://community.zammad.org/u/Tealk)
#### Post date: [September 22, 2020, 10:30am UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323/9 "2020-09-22T10:30:01Z")

</div>

Hello,

thanks for your answer.  
So the Notification Sender mail address is always used automatically during registration?

---

<div class="post-metadata">

### Author: ![MrGeneration](https://community.zammad.org/user_avatar/community.zammad.org/mrgeneration/32/9260_2.png) [@MrGeneration](https://community.zammad.org/u/MrGeneration)
#### Post date: [September 22, 2020, 10:34am UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323/10 "2020-09-22T10:34:02Z")

</div>

Yes and no, that depends on how you setup the user account in question.  
The notification channel and its mails mainly affects your agents (e.g. new ticket mails) or when a using wants to change the password of the account.

A more complete list can be found here:  
[https://admin-docs.zammad.org/en/latest/manage/trigger/system-notifications.html](https://admin-docs.zammad.org/en/latest/manage/trigger/system-notifications.html)

---

<div class="post-metadata">

### Author: ![Tealk](https://community.zammad.org/user_avatar/community.zammad.org/tealk/32/3249_2.png) [@Tealk](https://community.zammad.org/u/Tealk)
#### Post date: [September 22, 2020, 10:59am UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323/11 "2020-09-22T10:59:15Z")

</div>

Sorry I did not make myself clear.  
If I set up a SMTP server for notification, I only need a mail server, username and password.  
Does Zammad also check the address entered in the “Notification Sender” field when registering the SMTP server?

---

<div class="post-metadata">

### Author: ![Tealk](https://community.zammad.org/user_avatar/community.zammad.org/tealk/32/3249_2.png) [@Tealk](https://community.zammad.org/u/Tealk)
#### Post date: [September 22, 2020, 11:05am UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323/12 "2020-09-22T11:05:37Z")

</div>

Ok before you enter the SMTP server for the notifications you have to set the address at “Settings -\> Notification Sender” to the correct mail address.  
I don’t understand what this has to do with the login to the SMTP server, but then it works without problems.

Thanks for the food for thought @MrGeneration

---

<div class="post-metadata">

### Author: ![system](https://community.zammad.org/uploads/default/original/1X/5c5afaea2d23f811dbec33cd4edb02fa29d3262f.png) [@system](https://community.zammad.org/u/system)
#### Post date: [January 20, 2021, 11:05am UTC](https://community.zammad.org/t/untrapped-exception-in-pythonfilter/5323/13 "2021-01-20T11:05:42Z")

</div>

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
