Quantcast

configuring ConsumeImap with no password mailbox

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

configuring ConsumeImap with no password mailbox

Roy, Aesha Dhar
Hi,

We have a process mailbox from which we want to consume all emails using nifi. The problem is that this mailbox does not have a password. But nifi does not allow me to configure the ConsumeImap without password.
I tried putting some random password but I get connection exceptions with that.

Is there some other way of connecting to this passwordless mailbox?

Regards,
Aesha


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: configuring ConsumeImap with no password mailbox

Andy LoPresto-2
Aesha,

The ConsumeIMAP processor extends AbstractEmailProcessor, which specifies password as a required and non-empty field. You would need to edit this file [1] and replace the validator StandardValidators.NON_EMPTY_VALIDATOR with Validator.VALID to always pass. If you rebuild and deploy the application, this should work. 

You can also file a Jira [2] to request this feature/improvement is added to the master branch. 

public static final PropertyDescriptor PASSWORD = new PropertyDescriptor.Builder()
            .name("password")
            .displayName("Password")
            .description("Password used for authentication and authorization with Email server.")
            .required(true)
            .expressionLanguageSupported(true)
            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
            .sensitive(true)
            .build();


On May 11, 2017, at 8:27 PM, Roy, Aesha Dhar <[hidden email]> wrote:

Hi,

We have a process mailbox from which we want to consume all emails using nifi. The problem is that this mailbox does not have a password. But nifi does not allow me to configure the ConsumeImap without password.
I tried putting some random password but I get connection exceptions with that.

Is there some other way of connecting to this passwordless mailbox?

Regards,
Aesha




signature.asc (859 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: configuring ConsumeImap with no password mailbox

Matt Burgess-2
Alternatively (in the Jira, e.g.) the field could be marked as
required(false), might be a better visual indicator to the user that
nothing need be entered in that field.

Regards,
Matt

On Fri, May 12, 2017 at 11:35 AM, Andy LoPresto <[hidden email]> wrote:

> Aesha,
>
> The ConsumeIMAP processor extends AbstractEmailProcessor, which specifies
> password as a required and non-empty field. You would need to edit this file
> [1] and replace the validator StandardValidators.NON_EMPTY_VALIDATOR with
> Validator.VALID to always pass. If you rebuild and deploy the application,
> this should work.
>
> You can also file a Jira [2] to request this feature/improvement is added to
> the master branch.
>
> public static final PropertyDescriptor PASSWORD = new
> PropertyDescriptor.Builder()
>             .name("password")
>             .displayName("Password")
>             .description("Password used for authentication and authorization
> with Email server.")
>             .required(true)
>             .expressionLanguageSupported(true)
>             .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
>             .sensitive(true)
>             .build();
>
> [1]
> https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/AbstractEmailProcessor.java#L91-L91
> [2] https://issues.apache.org/jira/secure/CreateIssue!default.jspa
>
>
> Andy LoPresto
> [hidden email]
> [hidden email]
> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69
>
> On May 11, 2017, at 8:27 PM, Roy, Aesha Dhar <[hidden email]> wrote:
>
> Hi,
>
> We have a process mailbox from which we want to consume all emails using
> nifi. The problem is that this mailbox does not have a password. But nifi
> does not allow me to configure the ConsumeImap without password.
> I tried putting some random password but I get connection exceptions with
> that.
>
> Is there some other way of connecting to this passwordless mailbox?
>
> Regards,
> Aesha
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: configuring ConsumeImap with no password mailbox

Andy LoPresto-2
Yep, that is a much better idea and what I meant to originally type before I got sidetracked with the validator piece. Thanks Matt. 

Andy LoPresto
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

On May 12, 2017, at 8:48 AM, Matt Burgess <[hidden email]> wrote:

Alternatively (in the Jira, e.g.) the field could be marked as
required(false), might be a better visual indicator to the user that
nothing need be entered in that field.

Regards,
Matt

On Fri, May 12, 2017 at 11:35 AM, Andy LoPresto <[hidden email]> wrote:
Aesha,

The ConsumeIMAP processor extends AbstractEmailProcessor, which specifies
password as a required and non-empty field. You would need to edit this file
[1] and replace the validator StandardValidators.NON_EMPTY_VALIDATOR with
Validator.VALID to always pass. If you rebuild and deploy the application,
this should work.

You can also file a Jira [2] to request this feature/improvement is added to
the master branch.

public static final PropertyDescriptor PASSWORD = new
PropertyDescriptor.Builder()
           .name("password")
           .displayName("Password")
           .description("Password used for authentication and authorization
with Email server.")
           .required(true)
           .expressionLanguageSupported(true)
           .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
           .sensitive(true)
           .build();

[1]
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-email-bundle/nifi-email-processors/src/main/java/org/apache/nifi/processors/email/AbstractEmailProcessor.java#L91-L91
[2] https://issues.apache.org/jira/secure/CreateIssue!default.jspa


Andy LoPresto
[hidden email]
[hidden email]
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

On May 11, 2017, at 8:27 PM, Roy, Aesha Dhar <[hidden email]> wrote:

Hi,

We have a process mailbox from which we want to consume all emails using
nifi. The problem is that this mailbox does not have a password. But nifi
does not allow me to configure the ConsumeImap without password.
I tried putting some random password but I get connection exceptions with
that.

Is there some other way of connecting to this passwordless mailbox?

Regards,
Aesha





signature.asc (859 bytes) Download Attachment
Loading...