Opened 5 years ago

Closed 6 weeks ago

#1484767 closed Feature Patches (wontfix)

SMTP settings override via Identities

Reported by: Hobbes Owned by:
Priority: 5 Milestone: later
Component: Core functionality Version: git-master
Severity: normal Keywords: smtp settings override identity
Cc: Atrus, unstko@…, sendsbeak@…, diw@…

Description (last modified by alec)

As posted on the dev list, an ugly hack to override SMTP settings from within identities. I guess it would need some cleaning up and probably some security enhancements as well. For example would it be nice to enable/disable the feature and/or being able to restrict to some SMTP servers from within the configuration.

Quote from the mail to the dev list:
"Basically it adds the smtp_ settings to the identity settings, and, and this is the ugly part, passes the identity array all the way through, until the SMTP connection data is being assembled. The patch doesn't take care of non-MySQL databases. (The other DDL scripts are not being updated.)"

Opinions/ideas/suggestions are welcome,
Hobbes

Attachments (1)

roundcubemail-identity-smtp.svn1039.diff (8.5 KB) - added by Hobbes 5 years ago.
patch against svn1039

Download all attachments as: .zip

Change History (16)

Changed 5 years ago by Hobbes

patch against svn1039

comment:1 Changed 5 years ago by till

  • Milestone set to 0.1.1
  • Owner set to till
  • Status changed from new to assigned

Thanks, I'll be working on this in the next version.

comment:2 follow-up: Changed 5 years ago by thomasb

Should the average user really have to think of SMTP settings?
I'd like to keep the user prefs as simple as possible.

comment:3 in reply to: ↑ 2 Changed 5 years ago by Hobbes

Replying to thomasb:

Should the average user really have to think of SMTP settings?

No. There are very different use-cases though - to quote myself from the dev list:
"One thing I was missing though, was being able to override SMTP settings
from within Identities. This is because I use 3 different POP3/SMTP
accounts that I collect into a single IMAP account. For each of these
accounts I have to use different SMTP settings."

This of course is not the standard hosting use-case. My IMAP instance is exclusively for myself, and as mentioned I do need to handle multiple POP3/SMTP accounts with it, much like you'd otherwise do with a rich email client.

This option should, I totally agree with you there, not be enabled by default.

comment:4 Changed 5 years ago by till

  • Milestone changed from 0.1.1 to later

comment:5 Changed 5 years ago by Atrus

  • Cc Atrus added

comment:6 Changed 3 years ago by darkside

  • Cc jolexa@… added

comment:7 follow-up: Changed 2 years ago by alec

That should be simple to implement as a plugin using identity_form/identity_update/identity_create/identity_delete and smtp_connect hooks.

comment:8 Changed 2 years ago by till

  • Owner till deleted
  • Status changed from assigned to new

I second alec.

comment:9 Changed 22 months ago by elm

I would like to write that as a plugin but there are some questions I got.

I startet and used the identity_form hook to inject the additional form elements, but how am I supposed to get the values that were entered by the user? identity_update and identity_create do not provide the additional data to my plugin. And of course the data is not saved automatically.

Second question: When I get the data, how is a plugin supposed to save data? Do I have to write a backend for every database that roundcube supports?

I hope you can help me developing this plugin.

comment:10 Changed 21 months ago by unstko

  • Cc unstko@… added

I wrote a simple plugin to provide multiple SMTP server as counterparts for the configured IMAP hosts. Perhaps some of you want to help me to extend the plugin by individual SMTP servers per user which can be used user-wide or per mail domain.

You can find the plugin at GitHub?: https://github.com/unstko/Roundcube-plugins

comment:11 Changed 20 months ago by snzk

  • Cc sendsbeak@… added

comment:12 Changed 20 months ago by darkside

  • Cc jolexa@… removed

comment:13 in reply to: ↑ 7 Changed 18 months ago by daiw

  • Cc diw@… added

Replying to alec:

That should be simple to implement as a plugin using identity_form/identity_update/identity_create/identity_delete and smtp_connect hooks.

Suppose there is a way to add smtp settings to each identity. How do I know which identity is used in the smtp_connect hook? It only includes the smtp-settings and not the senders identity.

Is there an other hook I could for this?

comment:14 Changed 18 months ago by elm

Hey,

i wrote a plugin for that. It's not ready for production but it seems to work for me. Here you can find it:

https://github.com/elm/Roundcube-SMTP-per-Identity-Plugin

Greetz elm

comment:15 Changed 6 weeks ago by alec

  • Description modified (diff)
  • Resolution set to wontfix
  • Status changed from new to closed

I'm closing this as we don't want this in core, plugin exists and this is more or less a duplicate of multi-account feature request.

Note: See TracTickets for help on using tickets.